so basically i was doing this script
that changed the player camera to a part
and gets the bobbing script
and disables it
but i also wanted to do a startergui
with a close image button
and when i pressed the button the camera became the custom one
without the starteGui the script worked
when i tryed to use the starterGui the script didn't change my camera
#Any Idea why it doesn't change the camera?
40 messages · Page 1 of 1 (latest)
Sometimes the camera's type doesn't change unless you do this:
repeat wait() camera.CameraType = Enum.CameraType.Scriptable until camera.CameraType == Enum.CameraType.Scriptable
Any Idea why it doesn't change the camera?
no that is not the problem
the problem is with the gui i think
but idk how to fix it
ok first of all
you should handle ClicKDetectors and Proximity Prompts from Server scripts
damn
** You are now Level 7! **
Second of all, changing the properties of a UI in StarterGui won't replicate to the clients, as you would need to change the UI in the player's PlayerGui
If you send the script here I can change it for u
or you can try to do it yourself
my click detector and proximity still work even if they aren't in server script tho
yes they work but there's really no reason why you would handle that locally
ok i fyou wanna do it locally then change the 4th line
wait im confused
you are trying to disable the image button for every player right?
in teory it shoulded be for the player that clicked the screen
with clickdetector2
i probably did smth wrong
yeah
add this:
local player = game.Players.LocalPlayer
first thing in the code
then, change the Close Variable to:
local Close = player.PlayerGui.ComputerGui.ImageButton
also "if Close.MouseButton1Click" wont work
you need to do Close.MouseButton1Click:Connect(function()
It works now thanks
ye im stupid cuz i actually forgot to add the player and that the detector need this function Close.MouseButton1Click:Connect(function()
lol
but i didn't knew there was a playergui
i trhought only the startergui