#is there a simpler way to write this without using game.workspace
125 messages · Page 1 of 1 (latest)
theres nothing wrong with using game.workspace tho
well what if i want to insert it with server storage
wdym
you want to check server storage?
well like what if i put one model in workspace and one model in serverstorage
** You are now Level 1! **
you need to make a seperate variable with game.GetService:(serverstorage) or smth along those lines
then you can simply do (variable).waitforchild:(thing your looking for )
so if i do that it doesnt matter if its in workspace or serverstorage?
i mean you can use either
servestorage is just abit harder to get to
actually im pretty sure you cna just do game.serverstorage but i'd reccomend the varible if you plan to reuse the object
is there any way i could do something like this or is it just not possible
you can do that
how do i fix the error under local
because it wasnt there when i did it without or im pretty sure
expected identifier when parsing expression got local
ok i fixed that but now
its saying this
but how come its not looking in workspace if i did serverstorage or workspace
put game.Workspace["CRJ-200"] before
the game.ServerStorage
therefore it will check workspace first
then what if i put it in serverstorage
ok i inserted it through admin from serverstorage
and its saying the same thing
i dont know if i need to do some other script to insert it
:WaitForChild() maybe?
** You are now Level 2! **
infinite yield possible now
maybe jsut do a if statement to check if exists
if infront of the game.workspace stuff?
local PLANE
if game.Workspace:FindFirstChild("CRJ-200") then
PLANE = game.Workspace:FindFirstChild("CRJ-200")
elseif game.ServerStorage:FindFirstChild("CRJ-200") then
PLANE = game.ServerStorage:FindFirstChild("CRJ-200")
end```
this worked but now the spotlight doesnt turn on when inserted from server storage
the light only works when its started in workspace
is the spotlight inside the CRJ-200
yeah its in crj-200.Lights.BEACON.SpotLight
do u turn it on through code? or is it always on?
through a gui button which uses code
local BEACON = PLANE:FindFirstChild("BEACON")
would i do "BEACON.SpotLight"
if its inside beacon then yes
shows this now
a light
a spotlight?
do BEACON.SpotLight.Enabled = true
right at the start of the script?
where ever u change enabled to true or false
do i change plane:findfirstchild"beacon.spotlight to just beacon
what
ok
** You are now Level 3! **
is the text also called BEACON?
yeah
this doesnt have mousebutton1click on it
none of my scripts do
it has mousebutton1down
this says one of ur scripts does
and its because u changed the name of the text
so u will need to go into that script
and edit it so it matches the name of the text
weird i dont see any
well thats gone now
now its saying this again
could u show me the whole script
oh yeah it is
hopefully this helps too