Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Could you use a local script to call on a regular script?

Is it possible to use a local script to call upon a regular script?

I am making a Holo Commands GUI, and as of current all it does is give a client sided map. I am needing it to be server sided like regular holo commands.

But doing that with only local scripts is virtually impossible, from my understanding of it. Which means I would need to be able to call on a Regular script, from a Local Script to make it work properly.

1 comment

0

Do you mean Remote Events and Remote Functions? Sorry, I am not sure what it is you are asking for.

1 answer

✓ Accepted answer

**The answer is yes, thankfully. **

Where I got my information: http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions

To call upon a server script from a local script, it's quite simple (Assuming you want to use an event) :

-- This is placed inside the Local script
 

local Event = -- location of your remote event
 
Event:FireServer(You send information here) -- fires signal to server to execute whatever is in the event
-- This is placed inside the Server script
 

Event = -- location of your remote event

 
function FunctionNameHere(receives information here)
	-- does stuff with received information to specified player (with information you provided)
end
 
Event.OnServerEvent:Connect(FunctionNameHere) -- When called upon, runs FunctionNameHere

This discussion is preserved as it was. New answers, comments, and votes are closed.