I have attempted to CFrame the player to a specific position into a generated map cloned to workspace once the Countdown reaches 1 without spawning inside the floor, however it is not working for me, can anyone help with this please? I also attempted to create a forcefield around the player, it also did not work. I don't what's wrong with my script.
Server Script in ServerScriptService
local countdown = game.ReplicatedStorage.Values:WaitForChild("countdown") for i = 15,0,-1 do countdown.Value = i if i == 1 then local map = math.random(1,3) if map == 1 then game.ReplicatedStorage.Maps.Normal:Clone().Parent = workspace.Map end if map == 2 then game.ReplicatedStorage.Maps.Red:Clone().Parent = workspace.Map end if map == 3 then game.ReplicatedStorage.Maps.Green:Clone().Parent = workspace.Map end print(map) for i, v in pairs(game.Players:GetPlayers()) do local spawnLocation = workspace.Map.FindFirstChildOfClass("Model").SpawnLocation v.Character.Torso.CFrame = spawnLocation.CFrame(spawnLocation.Position.X, spawnLocation.Position.Y + 10, spawnLocation.Position.Z) local FF = Instance.new("ForceField") FF.Clone() FF.Parent = v.Character.Torso wait(5) FF:Destroy() end end wait(1) end
It looks like you are trying to change the CFrame of the torso, which will not work since the player's primary part is the HumanoidRootPart. Therefore you would have to replace
v.Character.Torso.CFrame
with
v.Character.HumanoidRootPart.CFrame