#Any Idea why it doesn't change the camera?

40 messages · Page 1 of 1 (latest)

dusty juniper
#

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

worthy quarry
#

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
dusty juniper
#

Any Idea why it doesn't change the camera?

dusty juniper
#

but idk how to fix it

worthy quarry
#

The script is a server script right?

#

@dusty juniper

dusty juniper
#

nope

#

it's a startercharacterscript

worthy quarry
#

ok first of all

#

you should handle ClicKDetectors and Proximity Prompts from Server scripts

dusty juniper
#

damn

regal driftBOT
#

studio** You are now Level 7! **studio

worthy quarry
#

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

dusty juniper
#

my click detector and proximity still work even if they aren't in server script tho

worthy quarry
#

yes they work but there's really no reason why you would handle that locally

dusty juniper
#

i don't remember how to send it as a lua script

#

xD

worthy quarry
#

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?

dusty juniper
#

hmm

#

idk

dusty juniper
#

with clickdetector2

#

i probably did smth wrong

worthy quarry
#

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()

dusty juniper
dusty juniper
#

lol

#

but i didn't knew there was a playergui

#

i trhought only the startergui