So I have a script in Workspace, with a local script inside it. Inside the normal script is
game.Players.PlayerAdded:connect(function(player)
script.LocalScript:clone().Parent = player.CharacterAdded:wait()
end)
Inside the localscript is
local target = workspace.GFrame --Location of target(the thing you want to spin around)
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
local angle = 0
local begon = game.StarterGui.AtSpawn.AtSpawn.AtSpawn.Begin.TextButton --GUI Begin button
local bob = 0
function bobsdeath()
bob = bob + 1
end
while wait() do --Spins camera
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(0, angle, 0) --Rotate by the angle
* CFrame.new(0, 0, 5) --Move the camera backwards 5 units
angle = angle + math.rad(1)
if bob > 0 then break end
end
function begin()-- Returns cam to player
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
end
begon.MouseButton1Click:connect(bobsdeath,begin)
Whenever I click on the gui it does not end the function... Can someone help?

2 comments
Well I have done so, and still when I click on the GUI it dose nothing..
connect only takes one argument