#SurfaceGui TextButton not working

1 messages · Page 1 of 1 (latest)

rocky flint
#

Hello, i have a localscript in a textbutton but for some reason it is not working

rancid plume
#

Any errors?

rocky flint
#

No, the print ("Fired") doesn't even run

rancid plume
#

Ok

#

Change the local script into a normal script

#

and change run context to client

rocky flint
#

Okay but how about the player, how will i be able to get the player viriable?

rancid plume
#

Trust on this

#

Just keep the same code and everything

rocky flint
#

Alright

#

Thanks

rancid plume
#

lmk if that was the fix

#

Cuz I think that is the fix

#

But just in case

rocky flint
#

Wait but the fireclient won't work as i won't have the player variable

rancid plume
#

Just change the local script

#

Not the server script

#

Legit keep your code the same

rocky flint
rancid plume
#

Bro what are you doing 😭

rocky flint
#

..

radiant tinsel
#

your advice is very vague

rancid plume
#

He did not

radiant tinsel
#

let me take a look

rocky flint
rancid plume
#

It legit isn't

radiant tinsel
#

is anything overlapping the button and is the button's "active" property set to true?

rancid plume
#

Step 1. Replace the local script with a normal script
Step 2. Put the runcontext to a client
Step 3. Put the code from the old local script in there

#

That was what I told him

radiant tinsel
#

oh

#

runcontext

#

right

rancid plume
#

There is nothing wrong with his buttons

radiant tinsel
#

i still think its unnecesary

#

i never had an issue like this before

#

so i think something is wrong with the ui itself

rancid plume
#

For his scenerio, it is tho

#

You cannot have local scripts in the workspace unless it's a script

#

and scripts (server scripts only) have a special property that can bypass that

#

while remaining client sided

rancid plume
radiant tinsel
#

it was in workspace?

#

mb bro

#

didnt see that

#

i didnt think it was in workspace

#

it's parented to a textbutton

#

so i assumed it would be in startergui

rancid plume
#

This ss shows it is a surface ui

#

And in the picture you can see the surface ui is currently being rendered, which means it is in the workspace

radiant tinsel
#

yes i see

#

that's the fix then

rancid plume
#

So all he has to do is replace the local script with a server script

#

and changing the run context to be client sided

#

Thats the entire fix

radiant tinsel
#

could you give me some advice on my post rq if u dont mind

rocky flint
radiant tinsel
#

its in the scrips properties

#

localscripts cannot run in workspace

#

then its good to go

rocky flint
#

I already did

rancid plume
#

ping me cuz idk which one is urs

rocky flint
#

What about the fireclient, shouldn't it take the player inside

rancid plume
radiant tinsel
#

its running on client context

#

so it will be fine

rancid plume
#

Cuz it doesn't look like it

radiant tinsel
#

o wait

#

why did u change it

#

to fireclient

#

keep as fireserver

#

he said u dont have to change anything in the script

rocky flint
rancid plume
radiant tinsel
# rocky flint

in the first script, why did you change it to fireclient?

#

keep it how it was before

rocky flint
#

I think i got it now

#

Thank ya

rancid plume
#

mhm

harsh lynx
rancid plume