Answered by
5 years ago Edited 5 years ago
Hello, tantec! It is easy. Just use the RemoteEvent:FireAllClients()
function. Unlike FireClients()
, it doesn't require a player instance. The FireAllClients()
function should fire a RemoteEvent at the same time for everyone.
Here's an example:
Server:
1 | script.Parent.Touched:Connect( function (hit) |
2 | if hit.Parent:FindFirstChildOfClass( "Humanoid" ) then |
3 | game:GetService( "ReplicatedStorage" ).TouchGuiEvent:FireAllClient() |
Client:
1 | game:GetService( "ReplicatedStorage" ).TouchGuiEvent.OnClientEvent:Connect( function () |
2 | script.Parent.TextLabel.Text = "A humanoid has touched a part!" |
If this helped you please accept this answer.