Hello!
I am trying to make a script to spawn a user without the spawn locations.
Ive tried Vector3 and CFrame but I am not sure how to do it. I want to get rid of teams and use this instead!
Any help would be great!
Hello!
I am trying to make a script to spawn a user without the spawn locations.
Ive tried Vector3 and CFrame but I am not sure how to do it. I want to get rid of teams and use this instead!
Any help would be great!
local spawnCFrame = CFrame.new(0, 15, 0)
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character.PrimaryPart.CFrame = spawnCFrame
end)
end)
something like this should work
ok Thx ill try that (*30 char)
You can simply set the CFrame of the character to a Vector3 position.
Server Script
game:GetService(“Players”).PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(0, 1, 0))
end
end
Instead of using Object.CFrame = CFrame.new(), use the built-in function, SetPrimaryPartCFrame().
local spawnCFrame = CFrame.new(0, 15, 0)
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:SetPrimaryPartCFrame(spawnCFrame)
end)
end)
Ive tried it but for some reason it isnt working.
Is it a regular script in ServerScriptService?
Yes it is (*30 characters …)