So I have this function
Workspace.Quest1.Touched:connect(touchedquest1)
(Quest1 is a part)
and here is what the function does
function touchedquest1() if theytouchedquest1 == 0 then theytouchedquest1 = 1 message.Visible = true for key = 1, #text1 do message.Text = (text1:sub(1, key)) wait() end elseif theytouchedquest1 == 1 then end end
theytouchedquest1 is a variable.
My problem is whenever a user touches the part everyone has that function show up, is there anyway to make it so only the person that touched it will have it show up on there screen? (this is in a localscript)
Well if your problem is that it comes up for everyone.. You will want to make it say what player then... It's a simple way to do it..
function bleh(player) -- this will resort in the part that touched the brick plr = game.Players:FindFirstChild(player.Parent.Name) -- You need parent or else it's just going to be "LeftLeg" or "RightLeg" if theytouchedquest1 == 0 then theytouchedquest = 1 plr.PlayerGUI.Visible = true -- You will have to route it to what needs to be visible.. -- put the rest of the code.. end game.Workspace:FindFirstChild("Quest1"):connect(bleh)
one problem i see is you said
message.Visible = true --It should be game.Workspace.message.Visible=true