I have a script which should fire an event from client to server when they spawn in though it doesnt seem to connect to the server script
This is my local script:
^ everything works fine here
This is my server script:
The print(player.Name) in serverscript doesnt happen so afaik the function isnt running and I cant see why
Add a print
statement in the local script just before you FireServer
just to confirm that your logic is working and it is firing. The rest of it looks fine tbh.
seems to work fine, everything prints correctly in the local script
Maybe try something like this:
EquipSkin.OnServerEvent:Connect(function(player,skinequip)
--here put your function
end)
zaydoudou
(Codoudou)
April 26, 2022, 5:22pm
#5
Why is there so many ends at the end of the server script?
First one is for “function”, second one for big “if”, third one for “for” and last one for small “if”
zaydoudou
(Codoudou)
April 26, 2022, 5:25pm
#7
Oh i didn’t see it.
Smh, this is why you should always indent your scripts
Still the same,
nothing prints at all
Do you see any errors or nothing?
Mister33j
(qharntne)
April 26, 2022, 5:49pm
#10
ScriptedBen:
what’s that red error message above there, is it related?
Nah not related, theirs no errors with either of the scripts
Most likely you have touched an option in the studio, inside the game it should work.
What option could that be? Not touched any options in months and every other event/function works
More than an option, have you checked that you are not only looking at the client console?
Yeah theyre all on, server and client
heisIlan
(Ilan)
April 26, 2022, 6:03pm
#16
Where is the Local Script placed?
Also, after looking at your script, creating a Local Script to perform the transition isn’t necessary. You can do all those actions on a Server Script.
heisIlan
(Ilan)
April 26, 2022, 6:05pm
#18
Is the script that changes the “deploy” value a Local Script?
No thats done in a serverscript
heisIlan
(Ilan)
April 26, 2022, 6:07pm
#20
Can you put a print after the remote was fired in the Local Script to check if it blocks on the Local Script or on the Server Script?