I need to make a script that creates one boat for each player...
This is what I got:
local RepStorage = game:WaitForChild("ReplicatedStorage") local Remote = RepStorage:WaitForChild("GameRemote") --Wait for players game:WaitForChild("Players") wait(1) --FireClient Remote:FireAllClients() print("Countdown has been fired") --FireClient Remote.OnServerEvent:Connect(function(player) --Script goes here end)
how to know how many players
local players = game.Players:GetPlayers() print(#players)
spawn ship to every player
for i,v in pairs(game.Players:GetPlayers()) do local clone = game.ServerStorage.Ship:Clone() clone.Parent = workspace clone:MoveTo(v.Character.Head.Position) -- do any position of any body part end