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

How to make this script work in the workspace rather than the StarterPack?

Asked by 5 years ago

"LocalScript" Code and Explorer I need to know how to change this into a script that can be used in the Workspace instead of the StarterPack so I can make a crate that explodes when you touch it and press "Enum.KeyCode.E." I'm sorry if this question is a bit vague.

2 answers

Log in to vote
0
Answered by 5 years ago

Impossible to do.

What you can do is use remoteevents to communicate with the server however.

https://developer.roblox.com/articles/Remote-Functions-and-Events

0
Does that mean I have to use a different method? tdljayden 1 — 5y
0
You write the scrit inside a localscript, then use a removeevent to transfer the required values to the server. In this case, it is when the button is pressed. Thesquid13 301 — 5y
0
Will try to when I have time. tdljayden 1 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

I'm still learning this myself, but I think what you could do is create a regular script in the object you want to explode that will detect when a player is nearby and then fire that client to display the GUI to the player. If the player then interacts with the GUI, fire the server again to do whatever it is you want to do with the object (explode).

At least I think that's how it goes.

Answer this question