i want to make it so when the player clicks a button inside a frame it then changes the camera. i am using this script:
repeat wait() until Player.Character
Camera.CameraType = "Scriptable" Camera.CFrame = game.Workspace.CamPart.CFrame
script.Parent.Enabled = true
to set the camera to a part when you join the game. i want it to do the same thing but it activates not when you join the game but when you click a button in a frame inside a gui in starter gui.. thank you for any help you can provide
You didn't script the part where a player has to click a button in order for the code to execute. You said you wanted the GUI to be visible though when a player clicks the button.
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.ButtonName.MouseButton1Click:Connect(function() -- button has to be whatever the player is supposed to click game.Workspace.Camera.CameraType = "Scriptable" game.Workspace.Camera.CFrame = game.Workspace.CamPart.CFrame script.Parent.Enabled = true end)