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 10 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

01repeat
02wait(0.05)
03if script.Parent.Value == 1 then
04script.Parent.Parent.MechName.Text = "Forest Camo Mech single gun"
05Workspace.CurrentCamera.CameraSubject = Workspace.CameraFocus1
06Workspace.CurrentCamera.CameraType = "Attach"
07 
08elseif script.Parent.Value == 2 then
09script.Parent.Parent.MechName.Text = "Forest Camo Mech double guns"
10Workspace.CurrentCamera.CameraSubject = Workspace.CameraFocus2
11 
12elseif script.Parent.Value == 3 then
13script.Parent.Parent.MechName.Text = "Forest Camo Mech double guns w/ cannon"
14Workspace.CurrentCamera.CameraSubject = Workspace.CameraFocus3
15end
16until script.Parent.Parent.CamValue.Value == 0

Please help!!! Thank you!!!

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

1 answer

Log in to vote
1
Answered by
Sublimus 992 Moderation Voter
10 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 — 10y
Ad

Answer this question