Player Spawn Module not working

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

  1. What do you want to achieve?

I am currently making a system where the player joins a game and they get teleported into a lobby where the camera will be manipulated and they will be anchored, somewhat similar to a fortnite lobby.

  1. What is the issue?

The module is working however, when the player is teleported, the player ragdolls and will be on the ground. Here is a picture

image

  1. What solutions have you tried so far?

I tried teleporting the player a few studs above from the spawn part

The Module script:

local player = {}

function player.Spawn()
	print("Spawning in Progress!")
	--\\Variables and Services//--
	local plrs = game:GetService("Players")
	local plr = plrs.LocalPlayer
	local char = plr.Character or plr.CharacterAdded:Wait()
	local hrp = char:WaitForChild("HumanoidRootPart")
	local hum = char:WaitForChild("Humanoid")
	local camera = game.Workspace.CurrentCamera
	


	local clone = game.Workspace:WaitForChild("Lobby"):Clone()
	local camPart = clone:WaitForChild("CamPart")
		clone.Name = plr.Name.."Party"
		clone.Parent = game.Workspace
		for i,v in pairs(clone:GetChildren()) do
			v.CFrame = v.CFrame + Vector3.new(0,0,200)
		end
	hrp.CFrame = clone:WaitForChild("StandPlateLeader").CFrame + Vector3.new(0,10,0)
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = camPart.CFrame
	end


return player

The Local Script

local playerModule = require(game.Workspace:WaitForChild("PlayerFramework"))

local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum =  char:WaitForChild("Humanoid")

if char then
	playerModule.Spawn()
end

Thanks

Can you try using Cframe.new() in place of multiplying cframe and vector.

Also are the part named clone in you code, the yellow pads on the screenshot? If it has invisible parts that strech till up the player might get stuck if CanCollide is on.

Ok, I will try CFrame.new() and no, I am cloning the model and using a loop to clone each part in the model. And there is only a camera part which is invisible and CanCollide is set to false.

Thank You, @WaterJamesPlough its now fixed :smiley:

1 Like