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

Start GUI and turning camera?

So, I've found a camera thing on free models, And basically it spins round a block until someone presses a button on a GUI. However, the button does not seem to be working..

local target=Workspace.ViewBlock
local camera=Workspace.Camera
camera.CameraSubject=target
local angle=5

while wait() do 
	camera.CoordinateFrame=CFrame.new(target.Position)
    * CFrame.Angles(0,angle,0)
	* CFrame.new(0,0,-16)
    angle=angle+math.rad(.2)
end

This script is copied into StarterPlayer and StarterPack and is a normal script

script.Parent.MouseEnter:connect(function() 
	script.Parent.TextColor3 = BrickColor.new('Light stone grey').Color
end)
script.Parent.MouseLeave:connect(function() 
	script.Parent.TextColor3 = BrickColor.new('Institutional white').Color
end)

function onButton1Down()
	wait()
	local zcam = Workspace.Camera
	zcam.CameraSubject=game.Players.LocalPlayer.Character.Humanoid
	zcam.CameraType="Custom"
wait (0.1)
script.Parent.Parent.Parent.Parent.Parent.Backpack.CamFix:remove()
script.Parent.Parent:remove()

end
script.Parent.MouseButton1Down:Connect(onButton1Down)

Is a local script inside the button...

So basically, What am I doing wrong to make the GUI disappear and the camera stop spinning? Thanks in advance! c:

1 answer

When my brother was coding this, it was very difficult. It took him around 3 days to perfect it. I think I can get him to help you. His username on ROBLOX is bobafett3544. Message him and ask him to help, he comes on every day.

HOW HE DID IT:

He created an invisible part on the map somewhere and created a script that would make the camera rotate around the part. He then made a GUI button that would disable the camera movement. The screen fades to black, then fades back in, and you have all your normal GUIs and your camera follows your character, as normal. Just a method of doing it if you don't feel like contacting him.

1 comment

0

Thanks for the reply. Although the one I have does not fade, you click the button and you're back to normal. I shall try tomorow to get into contact with him to see if he can help if no one on here can come up with a solution. Thanks again c:

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