I want to make a system where if a player touches a specific part, then a value in it would change to true if not already, i have this script in the part :
local part = script.Parent part.Touched:Connect(function(hit) print("Touched") if hit then if hit.Parent:FindFirstChild("Humanoid") then print("An humanoid Touched") local p = game.Players[hit.Parent.Name] print(hit.Parent.Name) local s = p:FindFirstChild("IsTouched") if s then print("Value found") print("Changing....") s.Value = true print("Changed!") end end end end)
It work only one time and when i try a second time it doesn't
When i change the value manualy it works
it prints out everything on every tries i've made, even if the value does not change
Thanks for futur answers!