Help With Zone Script

Issue: The player is parented to SubPlayers rather than PlayingPlayers if they equip a tool or already equipped a tool.

Code:

local ReadyPlayers = game.Workspace.Core.Players.Ready
local PlayingPlayers = game.Workspace.Core.Players.Playing
local SubPlayers = game.Workspace.Core.Players.Sub

Zone.Touched:Connect(function(Hit)
	local Character = Hit.Parent
	if game.Players:GetPlayerFromCharacter(Character) then
		Character.Parent = ReadyPlayers
	end
end)

Zone.TouchEnded:Connect(function(Hit)
	local Character = Hit.Parent
	if game.Players:GetPlayerFromCharacter(Character) then
		if Character.Parent == PlayingPlayers then
			Character.Parent = PlayingPlayers
		else
			print(1)
			Character.Parent = SubPlayers
		end
	end
end)

Use the zone plugin,zone is pretty tough

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.