when player touch part it change text in gui?
--[[ This is a LocalScript. Insert it into StarterGui. --]] local gui = game.StarterGui["YourGuiName"] local frame = gui["YourFrameName"] local t = frame["YourTextName"] game.ReplicatedStorage.TouchedFunction:FireServer() game.ReplicatedStorage.TouchedFunction.OnClientEvent:Connect(function() t.Text = "hello lol" -- You can edit this however you like end)
Server:
--[[ This is a server script. You should insert it into ServerScriptService --]] game.ReplicatedStorage.TouchedFunction.OnServerEvent:Connect(function(plr) workspace["YourPartName"].Touched:Connect(function(hit) if hit.Parent then if hit.Parent:FindFirstChildOfClass("Humanoid") then local plr2 = game.Players:FindFirstChild(hit.Parent.Name) if plr2.Name == plr.Name then game.ReplicatedStorage.TouchedFunction:FireClient(plr) end end end end) end)
EDIT: I accidentally made an error on the Server, fixed it now!
EDIT2: Fixed the LocalScript. Replace YourGuiName, YourFrameName, and YourTextName with whatever the name of it is.
Good day!