Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

help with finding the right variable for player/cframe?

i have this code that i have been cracking my skull open trying to find the right variable to make work the point of the code is if someone press e the would teleport and face a certain direction on the map i but i cant get the player variable right to get it to work any help?

here is the code:

game.Players.PlayerAdded:Connect(function(player)
	
	local CharacterModel = player.Character 
	 
    CharacterModel:SetPrimaryPartCFrame(CFrame.new(1, 0, 1) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(0)))
end)
	

1 answer

local CharacterModel = player.Character or player.CharacterAdded:Wait()

This discussion is preserved as it was. New answers, comments, and votes are closed.