Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This Code is not Working and i dont know why, any suggestions?

Asked by 8 years ago
Camera = workspace.CurrentCamera
player = game.Players.LocalPlayer
character = player.Character
newPlayer = workspace.Head
newPlayerControl = newPlayer.BodyVelocity
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = newPlayer
mouse = player:GetMouse()

function PlayerController()
        while true do
        wait(.5)
        Camera.CFrame = newPlayer.CFrame
            *CFrame.new(0, 25, 0)
            *CFrame.Angles(-1.5, 0, 0)
        end
    newPlayerControl.Velocity = mouse.Hit.p
end

    mouse.Move:connect(PlayerController())

when i play it without the while loop section it moves the part but when i add it the only code that works is the while loop

0
nvm fixed it WeBuiltOurOwnWorld 6 — 8y

Answer this question