Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Camera script works in studio but not on roblox player?

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

2 comments

1

Is this script in a localscript?

0

No

1 answer

✓ Accepted answer

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

1 comment

0

That worked, but I ran into another issue THANK YOU THOUGH(At least it works!)

This discussion is preserved as it was. New answers, comments, and votes are closed.