I'm decently new to scripting and I made a game where you find things around the map and once you touch them a Text Lable pops up saying you found it but if you touch it again it will say you already found it. But if somebody else in the server touches it and then you touch it it will say you already found it because I'm using a script that changes the text when somebody touches it is there a way to get around this? Here is my code.
Popup = script.Parent.ScreenGui Ready = true function onTouch(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil and Ready == true then
Ready = false
local plyr = game.Players:FindFirstChild(h.Parent.Name)
local c = Popup:clone()
c.Parent = plyr.PlayerGui
wait(3)
c:remove()
wait(1)
Ready = true
script.Parent.Touched:Connect(function()
script.Parent.RR.TextLabel.Text = "You Already Found This Blank"
script.Parent.RR.TextLabel.TextScaled = true
end)
end
end
script.Parent.Touched:connect(onTouch)
Edit:Pretend the code thats out of the script thingy is in it lol

4 comments
Try using a click
I will update it to make it so it can use a touched event
I will update it to make it so it can use a touched event
well no you can make the prompt so it only works if someone is VERY close to the prompt