Similar to the Island Royale squad system

My problem currently is that whenever I try to position a player locally, with remote events it replicates to the server. And if I move them only using a local script, something automatically teleports the player back. Hopefully I was able to explain what I need help with a little better than last time.

local players = game:GetService("Players")
me = game.Players.LocalPlayer
local player_table = {}
local yards = {"playerSlot1", "playerSlot2", "playerSlot3", "playerSlot4"}

local function onPlayerAdded()
local child = players:GetChildren()
for i = 1, #child do
	if player_table[child[i].Name] == nil then
	local player = child[i]
		
	if player  == me then 
	player_table[player.Name] = "MyYard"
	local yard = game.Workspace.Map[player_table[player.Name]]
		
	player.Character.HumanoidRootPart.CFrame = CFrame.new(yard.Pad.Position + Vector3.new(0,5,0) ,game.Workspace.Map.Middle.Corn.Position)
			
else
	player_table[player.Name] = yards[1]
	table.remove(yards, 1)


local yard = game.Workspace.Map[player_table[player.Name]]
player.Character.HumanoidRootPart.CFrame = CFrame.new(yard.Pad.Position + Vector3.new(0,5,0) ,game.Workspace.Map.Middle.Corn.Position)
	end
	end
end
end

Example: Say we have two players: Builderman and Telamon

On Builderman's computer, bm is standing on Platform 1 while Telamon is standing on platform 2. However on Telamon's screen, Telamon is standing on Platform 1 while Bm is on Platform 2.

6 comments

0

Use local script

0

You could try cloning the characters and putting fake ones on the platform.

0

Position them all using local script and just make it so the local player is standing on platform 1

0

The script above is a local script in starter pack. When I move them locally, they teleport back to the original spot after a brief delay

0

Then you could use a loop if they stay briefly... idk if it would work exactly how you want... how long is the delay?

0

About a split second. I found that if I anchored the HumanoidRootPart, it would stay. But with this another problem arises where the character might be laying down or having a frozen fling motion.