workspace script :P Works fine in studio, not in real servers, don't really see the problem rip

print('running1')

local posPart = workspace:WaitForChild("posPart")
print('running2')

game.Players.PlayerAdded:connect(function(plr)
	wait(3)
	print('anchoring')
	local char = plr.Character or plr.CharacterAdded:wait()
	
	local charModel = Instance.new('Model',workspace)	
	
	for index, charPart in pairs(char:GetChildren()) do
		if charPart.Name == 'HumanoidRootPart' then
			print('teleporting')
				charPart.CFrame = posPart.CFrame
		end
		if charPart:IsA('BasePart') then
			charPart.Anchored = true
		end
	end
end)

3 comments

0

line 16 :P

0

DOn't really get the error?