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

How can I disable fighting moves while players are in a certain area?

Asked by 4 years ago
Edited 4 years ago

I have a lobby in my game where players wait until they spawn in a map. I typed out this code but it didn't work. The local scripts identified in the code are the scripts that bind a key to a move and I also put a huge part that covers the entire lobby that represents the space in which players won't be able to use fighting moves.

local disabler = script.Parent -- The space in which I want fighting moves disabled.

disabler.Touched:Connect(function(hit)
    if hit.Name == "Right Leg" then
        game.StarterPack.BlackHole.LocalScript.Disabled = true
        game.StarterPack.FireBall.LocalScript.Disabled = true
        game.StarterPack.RapidFire.LocalScript.Disabled = true
    end
end)
0
what's the error? Vid_eo 126 — 4y
0
It doesn't work. The script seemed like it didn't do anything at all because when I'm in the lobby, I can still use fighting moves. osamayousef123 11 — 4y

Answer this question