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

[SOLVED BY ME] Is there a more effective way than placing a bunch of localscripts in the StarterGui?

Hello. When making E to interact's, I usually make a LocalScript inside of the StarterGui and type in the following:

local function Epress(keyCode)
	if keyCode.keyCode == Enum.KeyCode.E then
		print("E has been pressed")
	end
end
game:GetService("UserInputService").InputBegan:Connect(Epress)

But however, when I create multiple objects to interact with...

..It gets messy.

Loads of LocalScripts, unnamed in the StarterGui, clogging all the space and risking more bugs.

Is there a more effective way to do this without clogging up a service? (Aside from workspace)

4 comments

0

Idk man maybe make one script with different functions

0

I ususally use ModuleScripts on the ServerScriptService and re-use the function of the Script. So it's more effective.

0

And start creating Folder to store all the things I need. And it doesn't get messy.

0

^ that boi is spitting pure fax

1 answer

Sorry to break it to y'all, but I managed to find a way to not get messy. Apparently, I can use RemoteEvents to break out of the Server - Client barrier. Thank you all for contributing to my post!

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