I have a punch script put I want it to be disabled until you touch the ring and the script I wrote won't work. Any idea how I can do this?
script.Parent.Touched:connect(function() game.Players.LocalPlayer.PlayerScripts.Left_Punch_Local.Disabled = false game.Players.LocalPlayer.PlayerScripts.Right_Punch_Local.Disabled = false end)
local touchPart = workspace.Part local scripts = {workspace.Script1, workspace.Script2} touchPart.Touched:Wait() --Will wait for the part to be touched for _,cscript in pairs(scripts) do cscript.Disabled = false end
This will only execute once, if you want it to execute several times you do
touchPart.Touched:Connect(function() --continue code here.. end)
Can't you just put the whole script into an If statement that fires off on touch?