Hey, I'm trying to get a player to face a certian direction but for some reason the script doesen't seem to work. I believe it is because I'm not setting the player to the pPlayer variable but I'm not exactly sure how. If anyone sees where I made my mistake the help is welcomed.
Code:
function Teleport_FirstEnterWorld(pPlayer, Event) -- Remember to rename from teleport to change orentation
local race = pPlayer:GetPlayerRace()
if (race == 1) then
pPlayer:SetFacing(2.034960)
pPlayer:SendChatMessage(12, 7, "Glory to the Alliance!")
RegisterServerHook(3, "Teleport_FirstEnterWorld")
It is supposed to make the player face the orentation 2.034960 when he/she enters the game for the first time, this is because my playercreateinfo table doesen't have a field for orentation. The "Glory to the Alliance!" part is just for me to see that the script is working, so far it isn't. (This is just for human characters.)