A: I’m a noobie at placing scripts in the right place
B: I suck at figuring out which to put, local or normal script
C: I know a little about remotes
So can somebody help me on how to
A: make a loadcharacter button when loadcharacter is false using remotes
B: show me a few images on how to make it work (local script or normal script? Replicated Storage or ServerScriptService?)
Feel free to call me stupid or noob but at least help me a bit. Thanks! (Again this is probably my 5th or 6th time but I just don’t know where to put the scripts and what they should be.)
Edit: the summary is the ABCAB parts
First of all local scripts wont work outside player/character.
So for example if i put a local script in workspace then it won’t run.
We’re using Replicated Storage when we wan’t to store something for client or server.
So server and client can see instances in Replicated Storage and Replicated First
All of the instances in ServerScriptService are equal to nil for localscript beacuse it’s not replicating to client
Okay, so I put a script inside a button, path it to the remote, and make it loadcharacter() and bam, it works…?
for remote event it works like
local data = "blablabla"
local char = plr.Character
if not char then
okay so uh. As i said, I’m a newb/noob at remotes. I know I need to check if i fired it. can I ask: now what?
Module Script: A script used to store data, and functions. This script could be put wherever but it’s recommended you put it some place safe like ServerStorage if used by a regular script.
Script: This script is a server sided script. This means whatever happens in this script effects everyone’s screen. This script can be placed anywhere that isn’t ReplicatedStorage, ReplicatedFirst, or ServerStorage.
LocalScript: Another script, only effects stuff that happens on your screen unless you’re playing an animation, or sound created by a server script. This script can be placed in: StarterPlayer, StarterPack, Your Player, and StarterGui. Anywhere else and it’s likely not going to work.
Okay, so summary: I can cross out modules and local scripts but the person who wrote this still has 5 IQ about remoteevents.
RemoteEvents: These are events literally just events. Ever use a Touched event? e.g
-- runs code inside of this function
This function connects an event that runs code between.
Now let’s look at a RemoteEvent setup.
local remote = game.ReplicatedStorage:WaitForChild("eventname") -- waiting for the event
remote:FireServer() -- this can be related to when a player touches a part as an action
local remote = game.ReplicatedStorage:WaitForChild("eventname") -- same event
-- code here
Same thing as the touched event. Runs code between only when called from a localscript ‘FireServer()’ is how it’s called…
Remote Events can be placed anywhere, but you should usually just place them in ReplicatedStorage.
um. Can somebody do a few images because I only have about 10 IQ added to the original 5 I had about remotes.
Its a bit clear too though just no mousebutton1click
just read what I said until you understand. repetition is key.
okay, time to test it out for the 100th
Ill mark it as solution if it works
local scripts - only you can see it, it only works for you
normal script - everyone can see it
also wdym by placing scripts in the right place?
The button would go on the Client (LocalScript), while the load character script would go in the server (Normal script)
Make sure to have a RemoveEvent in ReplicatedStorage called LoadCharacter.
oh, I guess I can learn from it too