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

Camera script works in studio but not on roblox player?

Asked by 9 years ago

This is my script, it works perfectly fine on studio but when I play in roblox, it doesn't work! Why? Here is my script

    repeat
    wait(0.05)
    if script.Parent.Value == 1 then
    script.Parent.Parent.MechName.Text = "Forest Camo Mech single gun"
    Workspace.CurrentCamera.CameraSubject = Workspace.CameraFocus1
    Workspace.CurrentCamera.CameraType = "Attach"

    elseif script.Parent.Value == 2 then
    script.Parent.Parent.MechName.Text = "Forest Camo Mech double guns"
    Workspace.CurrentCamera.CameraSubject = Workspace.CameraFocus2

    elseif script.Parent.Value == 3 then
    script.Parent.Parent.MechName.Text = "Forest Camo Mech double guns w/ cannon"
    Workspace.CurrentCamera.CameraSubject = Workspace.CameraFocus3
    end
    until script.Parent.Parent.CamValue.Value == 0

Please help!!! Thank you!!!

1
Is this script in a localscript? Sublimus 992 — 9y
0
No yogipanda123 120 — 9y

1 answer

Log in to vote
1
Answered by
Sublimus 992 Moderation Voter
9 years ago

If you want to access the CurrentCamera of Player, you must access it through a LocalScript.

0
That worked, but I ran into another issue THANK YOU THOUGH(At least it works!) yogipanda123 120 — 9y
Ad

Answer this question