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

Can you please help me with this script?

This script will show camera on a brick. But how do i stop the effects so it goes back to player camera? I want it so when you Reset it will stop.

repeat wait() until game.Workspace.CurrentCamera
repeat wait() until game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
local target = game.Workspace.CameraPart --Part it rotates around
local camera = game.Workspace.CurrentCamera
camera.CameraSubject = game.Workspace.CameraPart --Part it rotates around
camera.CameraType = "Scriptable"
local angle = 0
play = false



repeat
wait()
camera.CoordinateFrame = CFrame.new(target.Position) * CFrame.Angles(0, angle, 0)
until play == true

local Player = game.Players.LocalPlayer
---
function Joined()
-- camera manipulation here.

end


1 answer

The loop at line 12 will be endless as you never change play to true.

1 comment

0

Oh ok thanks i never saw the loop there before.

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