local value = script.Parent.Value.Value
script.Parent.Touched:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
script.Parent.Value.Value = script.Parent.Value.Value + 1
script.Parent.SurfaceGui.TextLabel.Text = "Desert Map - " .. value
end
end)
script.Parent.TouchEnded:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
script.Parent.Value.Value = script.Parent.Value.Value - 1
script.Parent.SurfaceGui.TextLabel.Text = "Desert Map - " .. value
end
end)
the script should change a textlabel but when a player steps on it, it doesn't do that.

3 comments
Try "if hit.Parent:FindFirstChild("Humanoid")" instead.
on line 3, do "if hit.Parent:FindFirstChild("Humanoid") then" and on line line 9, the same thing. "if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then" doesnt do anything but create alot of lag in the syntax of the script. it messes the the system up
tried, text didn't change, but thanks for the notice, i'll start to change the scripts from now on