![]() ![]() If not TycoonOwner then- Character is not owned by a player (probably an NPC), abort codeĪgain this is using objectvalue rather than stringvalue because objectvalues in this use case are more versatile than using a stringvalue. Local TycoonOwner = PlayerService:GetPlayerFromCharacter(part.Parent)- We need a reference to this value after the if check, hense why we're not getting it in the if check above us. Check #2: Abort code if it isn't owned by a character Check #1: Abort code if a player already owns this tycoon If PlayerOwner.Value or not part.Parent:FindFirstChild("Humanoid") then it’s not what i /need/ for what i’m doing, but, it’s basic enough and i can always go to edit it later. i want it so if you’re on top of a part, that part’ll become invisible until you step off of it. TycoonDoor.Touched:Connect(function(part) i’ve read upon raycasts and rays and whatnot for the past hour, and, no matter what i do, i feel so awfully confused. PlayerOwner = Instance.new("ObjectValue") PlayerService = game:GetService("Players") I’ll quickly make it all one line to show you how it should be looking There’s only one if case in here while the example code uses 3? Doesn’t seem like you’re using these compound if checks correctly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |