How do i make this script wrok

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I made a bring all command issue is I can’t make it work,

  2. What is the issue? Include screenshots / videos if possible!

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Everything global variables differentiate between player and other players 3 days on this script
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

game.ReplicatedStorage.BringAllRemote.OnServerEvent:Connect(function(Player)
for i,v in pairs(game.Players:GetPlayers()) do
for i,x in pairs(ids) do
if v.UserId ~= x then
char = v.Character
print(char)
elseif v.UserId == x then
Owner = game.Players:GetPlayerByUserId(x)
OwnerChar = Owner.Character
Head = OwnerChar.Head
while true do
wait(0.0)
Part.CFrame = Head.CFrame:ToWorldSpace(offset)
char.PrimaryPart.CFrame = Part.CFrame
break
end
end
end
end
end)

What is an error? What are you trying to achieve?

1 Like

You’re gonna have to be more specific than “how do i make this work” if you want people to help you.

1 Like

Is there any error you’re getting. What are you trying to achieve

it don’t work or if it does it doesn’t teleport other players to the part, All I want is players to teleport to the part, except me.

game:GetService("ReplicatedStorage").BringAll.OnServerEvent:Connect(function(Player:Player?)
	for _,v in game:GetService("Players"):GetPlayers() do
		if v.UserId ~= Player.UserId then
			local Character = v.Character
			Character:MoveTo(Part.Position)
		end
	end
end)
1 Like

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