Why does this line yield the thread?
2 | sR = game:GetService 'RunService' |
4 | plr = game.Players.LocalPlayer |
6 | repeat wait() until plr.Character |
8 | if plr.Character then workspace.Remotes.engine:InvokeServer() end |
(localscript)
Plain and simple, ''3'' doesn't print. the script triggered by the Engine remotefunction does not have any yields either, so i cant see why its stopping the script.
The script triggered by engine by request:
(Yes i know CurrentCamera only works in localscripts this is just for tests)
01 | function workspace.Remotes.engine.OnServerInvoke(plr) |
02 | plr.Character:Destroy() |
03 | workspace.CurrentCamera.CameraSubject = workspace.Thingy.Head |
05 | workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable |
07 | workspace.CurrentCamera.CoordinateFrame = workspace.CurrentCamera.CoordinateFrame * CFrame.new( 3.5 , 0 , 0 ) |
09 | workspace.CurrentCamera.CoordinateFrame = workspace.CurrentCamera.CoordinateFrame |
10 | workspace.Remotes.localengine:InvokeClient(plr) |
11 | plr.CameraMode = Enum.CameraMode.LockFirstPerson |