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

Can anyone fix my script? I made the camera work but it's wrong.

Asked by 4 years ago

I made an intro gui but it seems when i reset the camera stays at one place.

first script

wait(0.01)

local player = game.Players.LocalPlayer
local character = player.Character
local camera = workspace.CurrentCamera
local PlayerGui = player.PlayerGui

repeat wait(0.01)
 camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable

wait(0.01)
if camera.CFrame == Enum.CameraType.Custom then
camera.CFrame = game.Workspace.CameraPosition.CFrame
else

camera.CFrame = game.Workspace.CameraPosition.CFrame

end

second script

local playergui = game.Players.LocalPlayer.PlayerGui

wait(0.01)
script.Parent.Visible = true

script.Parent.ZIndex = 1







script.Parent.MouseButton1Click:Connect(function()
    playergui.CharacterSelectionGui.Frame.Visible = true

        wait(.1)
script.Parent.Parent.Enabled = false
 workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
    end)

0
Try to add a CharacterAdded event, when the character gets added, set the Camera Type to Custom yHasteeD 1819 — 4y

Answer this question