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

The CameraOffset is a problem for me, I try to use it but it doenst Work. help?

Asked by 6 years ago

I'm trying to make the Camera stand to the side of the Character using CameraOffset, but it isn't working. Any Help is Appreciated.

local plr = game.Players.LocalPlayer

function Stuff()
    plr.Character.Humanoid.CameraOffset = Vector3.new(2, 0, -2)
end

1 answer

Log in to vote
0
Answered by
xEiffel 280 Moderation Voter
6 years ago

Hello, I'm not sure if this is what you're looking for, however, I've instead moved it out of a function. v

local plr = game.Players.LocalPlayer
local chr = plr.Character
if chr.Humanoid then
chr.Humanoid.CameraOffset = Vector3.new(2, 0, -2)
end

^ this works, make sure it is parented in the StarterGui as a LocalScript. If this isn't what you are looking for i'd be happy to help you again with a different code.

Ad

Answer this question