So I just placed a SpawnPoint in my building but it always spawns me on the roof whatever I do. So I made a script that would move the person that joins into the building.
So I went ahead and did that, but it doesn't work. The worst part is that it doesn't even say anything in the output.
My question is what did I do wrong?
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) char.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(225.502, 28.568, -236.095)) end) end)
dont listen to those people, they dont know what they r doing, just simply remove vector3.new thats it but keep the numbers so the script would be
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) char.HumanoidRootPart.CFrame = CFrame.new(225.502, 28.568, -236.095) end) end)
This is a rather easy fix:
local spawnPosition = game.Workspace.SpawnLocation.Position game.Players.PlayerAdded:Connect(function(player) player.Character.HumanoidRootPart.Position = spawnPosition end)
Tell me if this works. If it does, accepting my answer is much appreciated :)