Answered by
4 years ago Edited 4 years ago
FireAllClients Command
When it comes to using the :FireAllClients()
feature... I would only use that when you're trying to call to a LocalScript inside of StarterGui/StarterPlayerScripts/StarterCharacterScripts. That's my recommendation but use it as you believe fits. Here's a link that will lead you to how the FireAllClients command works.
Your Error
The error in your script is the script.Parent.Triggered:Connect
, after reviewing the script; I realized I missed this MASSIVE mistake. What you need to do is changed Triggered
to Touched
.
Server Script
1 | script.Parent.Touched:Connect( function (player) |
2 | game.ReplicatedStorage.Open:FireAllClients() |
Local Script
Do note that this command may not work if the LocalScript is in workspace, ReplicatedStorage, ReplicatedScriptService, ServerScriptService and ServerStorage.
1 | game.ReplicatedStorage.Open.OnClientEvent:Connect( function () |