#um im new to this server but ive been trying to find why this script isnt working
73 messages · Page 1 of 1 (latest)
that is a localscript therefore anything that is in that script will only be visible on your client unless you use remote events
this
local ClickDetector = workspace.Lobby.AbilityPlatform.ButtonStand.ClickDetector
```is not right for a localscript
you should look into client-server communication, FindFirstChild, WaitForChild, etc
wouldnt the server script make it so that one player can open the gui for all the other players?
if you want it to do that then you can
or you can fire to the client who clicked to open gui
or you can have
local ClickDetector = workspace.Lobby.AbilityPlatform.ButtonStand.ClickDetector
```on the client but with "WaitForChild" because that could fail
i see
it usually happens that instances have not loaded while scripts are running
yeah, it's because i found a video that explained the misuse of waitforchild so i tried to stop using it
too frequently that is
waitforchild is when you are not sure if the instance has loaded
findfirstchild is when it exists and you want to find the first child with that name
sometimes the name of a part is like "Value", "Name", etc and you need to use findfirstchild because of property conflicts
thanks for the clarification
you're welcome
so i can use remote server [function(player)] and change it to a server-side script
you can also have it on the client if you will not need anything to happen on the server
anything that would have to happen in all other clients
if it only opens a gui it can be on the client
in this context it's supposed to be an ability ui where you can scroll and select so yeah i guess client makes sense
you can make remote servers on client right?
remoteevents can both be used by client and server. but for the communication to be possible the event must exist on both parties (client and server)
usually remote events are placed into replicated storage
replicated means it exists on the server and on the client and they share the same thing
yeah i do that, ai misinforms me sometimes because it's kinda outdated
tbh i need to stop relying on ai most of the time
local script, but i fixed it. it was because a silly reason
this was supposed to be off
not sure why though
** You are now Level 3! **
Did you fix it with
- Bindable Method
- Remote Method
- etc (Optional)
etc (by turning off ResetOnSpawn)
it just worked perfectly after that
I didn't mean property, I mean on a Script
oh then no changes were made if you meant that
the script stayed in starterplayer
Then it's not gonna work
I FOUND A REASON
what
you also the put "MouseClick"
what is bindable
I mean RemoteEvent sorry
https://www.youtube.com/watch?v=GwhPXyYKkwU&pp=ygUbcmVtb3RlIGV2ZW50cyByb2Jsb3ggc3R1ZGlv
Advanced Roblox Scripting Tutorial #8 - Remote Events & Remote Functions (Beginner to Pro 2019)
Hey guys! Welcome back to another roblox scripting tutorial and guys in today's tutorial I am going to be teaching you about remote events and remote functions. Now this is a pretty complex topic so if you are confused don't feel bad I was at first a...
** You are now Level 9! **
use "MouseButton1Click" not just "MouseClick"!
mousebutton1click doesnt apply to clickdetectors
it only applies to textbuttons
oh I just noticed he was using a clickdetector lol
yeah
also thank you though i never use remotes because i suck at using them correctly...
ill learn to use them
Bro thought it was a TextButton/an ImageButton
I thought it was a textbutton
hahaha
Oh ok
do you want me to do this btw?
like that example
so it only replicates to client
it also talks about "InvokeServer()" which ive never heard of
I mean you should learn OnClientEvent
o
ill search it up on documentary
the ability ui is supposed to be connected to a clickdetector that the local script detects and opens the gui if the local player clicks
so it should only apply on the client side
The issue was that he was referencing the GUI in a script outside of GUI and, whenever he respawned, the previous GUI would get destroyed because of the "ResetOnSpawn" making the other script reference nil
@wintry acorn More
Use :Connect() instead of :Once()