Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

FE RemoteEvent, cloning tools into players?

Asked by 6 years ago

Hello!

So, I am trying to convert my scripts over to work with FE and I'm kinda stumped?

I want to clone a tool into the player when they sit on a seat but, so I have to make a separate localscript just to fire the event and then a server script to receive it?

I'm not sure on how to go about this and would appreciate any help.

This is my question???

1 answer

Log in to vote
0
Answered by
oSyM8V3N 429 Moderation Voter
6 years ago

Hi!, I've found a Solution to your question about FE. I'm not sure if it's gonna answer your question, but it will point you in the right Direction. I will be showing Examples on how i Fire my Events and Connect them through the SeverScriptService,

First;

Firing The Event Through A Regular/Local Script

local Event = whereyoureventis

Event:FireServer() -- put this where you want to fire the server, meaning when you want to clone or do anything else you need to. You can also send Information to the Server Script, such as : mouse Position, bool Values, etc. If you need an Example, please let me know,

Connecting The Event Through A ServerScript

local Event = whereyoureventis

local function onEvent(player) -- makes a local function called 'onEvent', and you can call this Event anytime you want throughout the script, so it can prevent you from writing it over and over
-- code
end


Event.OnServerEvent:Connect(onEvent) -- put this at the end of the script, so when you fire the Event from the Local/Reg script, it is ready to be Called

I don't think i explained this well, since i was rushing. But if you have any questions, errors, or more information, Please let me know

--oSy

0
Remember, 'player' is required, as it is the first argument in the script signal for onserverevent. The rest is args you can use to fire it. Robin5D 186 — 6y
Ad

Answer this question