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

Can you please help me with this script?

Asked by
NexeusX 137
10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

0
Oh ok thanks i never saw the loop there before. NexeusX 137 — 10y
Ad

Answer this question