Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a Touched Part For FilteringEnabled?

Asked by 5 years ago

Hello, i need a Touched part For Filtering enabled. Anonye correct me?

boton = script.Parent

function onTouch(part) game.Players.LocalPlayer.Character.LowerTorso.Anchored = true wait(6) game.Players.LocalPlayer.Character.LowerTorso.Anchored = false end

boton.Touched:connect(onTouch)

1 answer

Log in to vote
0
Answered by 5 years ago

Try:

local Part = script.Parent local Touched = false Part.Touched:Connect(function(Part) if Part.Parent:FindFirstChild("LowerTorso") and Touched == false then Touched = true Part.Parent:WaitForChild("LowerTorso").Anchored = true wait(6) Part.Parent:WaitForChild("LowerTorso").Anchored = false Touched = false end end

0
Thanks! Xx_andresXx 7 — 5y
0
Np RealProgrammerL_L -1 — 5y
Ad

Answer this question