I’ve been trying to change a specific players camera and i don’t know how to
Have you tried with local scripts and remote events?
yes, and none of it worked!
30!
nvm i tried again and it worked
Come on, man! I have this same problem. What did you do?
First I made a folder in replicatedstorage called ,“Values”. Then I made a Value Called,“ChangeCamera”, then I made a localscript in startergui and the script i basically used was
--Note: This is a working replica of my script
local Camera = workspace.CurrentCamera
local CameraPlayer = game.ReplicatedStorage.Values.ChangeCamera
CameraPlayer.Changed:Connect(function(plr)
if plr == CameraPlayer.Value then
Camera.CameraType = Enum.CameraType.Scriptable
--Do whatever you want to now
end
end)
Thanks man, it’s useful to know.
Have you checked to see if the script doesn’t affect more than 1 player? let’s say, 2 players join the server and one of them does the script, does it affect the other one or does it happen in one person?
it only affects one person, i tested it that way many times
wait the script doesn’t work i typed it wrong
heres the working one
local Camera = workspace.CurrentCamera
local CameraPlayer = game.ReplicatedStorage.Values.ChangeCamera
CameraPlayer.Changed:Connect(function(plr)
if plr == game.Players.LocalPlayer.Name then
Camera.CameraType = Enum.CameraType.Scriptable
--Do whatever you want to now
end
end)
Future edit note: This script is very inefficient and I suggest using remote events. I was fairly unintelligent when I made this script.