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

This camera script functions properly, but the player can't move past 2 seconds. Why?

Asked by 6 years ago

This script is inside a LocalScript and positions the camera above the player and rotates it so that it is always looking down. That part works fine, but then once the player moves like 2 studs then the player's movement becomes locked and they can't move anymore. I can't figure out why.

local player = game.Players.LocalPlayer
local service = game:GetService("RunService")

game.Workspace.CurrentCamera.CameraType = "Scriptable"

service.RenderStepped:connect(function()
    game.Workspace.CurrentCamera.CFrame = CFrame.new(game.Workspace[player.Name].Head.Position + Vector3.new(0, 20, 0)) * CFrame.Angles(math.rad(270),0,0)
end)
0
there is a thing in the character's humanoid called like cam offset or something wookey12 174 — 6y
0
@wookey12 I'm sorry, but I'm not following. ZappleOfficial 35 — 6y
0
Maybe it's because you're moving the head instead of the camera. The head is attached to the character's body so once the player moves, it'll probably try to attach to eachother? Idk sorry. The player should die rather than trying to attach to eachother tho e.e Nep_Ryker 131 — 6y
0
@Xrp200 I'm very confused. The script simply moves the camera whne the player moves. It shouldn't affect the player's movement, which is why I'm confused. ZappleOfficial 35 — 6y
0
Did you define "player" ? Ok you did nvm. Nep_Ryker 131 — 6y

Answer this question