Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Making a block look left and right?

I'm trying to make a working CCTV system, and need the camera to pan only to a certain angle, not a full circle, so that the camera would go

left (stop) (wait two seconds) right (stop) (wait two seconds)

and so on, so that is pans.

I've got the Camera to work, I just need to figure out how to make the block look left to right, like a head looking left to right.

1 answer

✓ Accepted answer
--//locals\\--
local SpinSpeedx = 0.1 -- Higher is less smooth
local SpinSpeedy = 0.1 -- Lower = smooth
local SpinSpeedz = 0.1 -- Medium speed = Looks laggy
local SpinWait = 0.03 -- How long it waits to show the next frame
--//Script\\--
while true do
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(SpinSpeedx,SpinSpeedy,SpinSpeedz) 
wait(SpinWait)
end

thansk

5 comments

1

HECK NO THIS IS TOO MUCH WORK

0

proffesor, for a noobie scripter, if you keep duplicating a line it makes it smoother when your doin this

0

it does not make it smoother, just harder to read and hinders readability

0

ill update it ok

0

why was this just accepted. my code sucks lol

This discussion is preserved as it was. New answers, comments, and votes are closed.