So i am trying to make a game where in a certain part the floor falls no disapear fall. this is what i currently have also i want this to not be in one client i want this to be for everyone.
Part = script.Parent
Part.Touched:Connect(function(hit)
Part.Anchored = false
end)
If you want this to only work if a leg touches it then we can do as follows:
Part = script.Parent Part.Touched:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) -- this just checks if a player exists if player then if hit.Name == "Left Leg" or hit.Name = "Right Leg" then Part.Anchored = false end end end)
Everything is good here, so I don't understand the problem. You could add a wait() if you want to give the players some time to get off. Also to reduce lag I would check if it is anchored already. Here is the improved script.
Part = script.Parent Part.Touched:Connect(function(hit) If Part.Anchored == true then wait(1) Part.Anchored = false end)
Let me know what the problem is and I can help furthermore, have a good day!