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

Camera is on humanoid,but locked, only see's one direction, Moves when character moves. Why?

Asked by
ziploz 7
8 years ago

Sorry for my English if it's bad.

this scripts doesnt seem to be working thats why the camera is locked.

Local Script on StarterCharacterScripts

local target = workspace.camera
local buttonfix = game.StarterGui.ScreenGui.mainmenu.TextButton
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
local angle = 0

while wait() do
    camera.CoordinateFrame = CFrame.new(target.Position)  --Start at the position of the part
                           * CFrame.new(0, 10, 0)       --Move the camera backwards 5 units
    angle = angle + math.rad(1)
end

Local Script in StarterGui.ScreenGUI.Frame

black = script.Parent.Parent
title = script.Parent
joingame = script.Parent.Parent.TextButton
whitestripe = script.Parent.Parent.Frame
cam = workspace.CurrentCamera


    for i = 0,1,0.1 do
    black.BackgroundTransparency = i
    wait(0.1)
end
    if black.BackgroundTransparency == 1 then
    script.Parent:TweenPosition (UDim2.new(0.5, -100, 0.1, -25), "Out", "Quad", 1, true)
    joingame.Visible = true 
    whitestripe.Visible = true
end

function onClicked()
title.Visible = false
joingame.Visible = false
whitestripe.Visible = false
    for i = 1,0,-0.01 do
        black.BackgroundTransparency = i
        wait (0.01)
    end
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"

    wait(1)
    for i = 0,1,0.1 do
        black.BackgroundTransparency = i
        wait(0.1)
    end
end

script.Parent.Parent.TextButton.MouseButton1Down:connect(onClicked)

Thank you

Answer this question