Here is my script that i have
--scripts parent is a part that I want to trigger
script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum then game.ReplicatedStorage.RemoteEvent:FireClient(game.Players:GetPlayers(hit.Parent)) end end)
-- Script that I want to change the text
local RemoteEvent = game.ReplicatedStorage.RemoteEvent RemoteEvent.OnClientEvent:Connect(function() script.Parent.Text = "Found" end)
serverside script:
script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") local Players = game:GetService("Players") if hum then game.ReplicatedStorage.RemoteEvent:FireAllClients(Players:GetPlayers(hit.Parent)) end end)
local script:
local RemoteEvent = game.ReplicatedStorage.RemoteEvent RemoteEvent.OnClientEvent:Connect(function() script.Parent.Text = "Found" end)
u were firing the client instead of AllClients. also put ur code ina code block next time