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 don't want players to use fighting moves.

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.Spam.LocalScript.Disabled = true
	end
end)

1 comment

0

I haven't scriped, but what I can tell you is that you're going to have to use events. For example, when a player touches the part, fire an event with the parameter of the player. After that you can disable the local scripts.