I want to destroy the gravity controller script for that player only when that player touchs the floor part anyone know how I can fix this? I dont want the gravity controller deleted for everyone though, just for that player!
local part = script.Parent part.Touched:Connect(function(hit) if part.Name == "Floor" then script.GravityController:Destroy() end end)
Local script:
local part = script.Parent part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild( "Humanoid") then if part.Name == "Floor" then part.GravityController:Destroy() end end)
If FilteringEnabled is enabled, just make that script a local script and put it within the local player (PlayerGui, Backpack, character, etc.). You'd obviously change line1 to be game.workspace.Part
or wherever your part is located. Alternatively, you could go the RemoteEvent route, but the simpler way that I stated seems fit for you
You might not want to destroy the script you should probably disable it instead
script.Parent.GravityController.disabled = false