RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"do the remote event for me just tell me where to put the scripts"
Sure, here's how you can do it: Server Script (Put this in ServerScriptService): ```lua local Players = game:GetService("Players") local part = script.Parent local sound = game.Workspace.Sounds.Goal sound.Volume = 1 sound.PlayOnRemove = false local function onPartTouched(otherPart) if otherPart.Name == "SoccerBall" then game.ReplicatedStorage.RemoteEvent:FireAllClients() sound:Play() end end part.Touched:Connect(onPartTouched) ``` Client Script (Put this in StarterPlayer > StarterPlayerScripts): ```lua local player = game:GetService("Players").LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local screenGui = playerGui:FindFirstChild("SoccerScore") game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function() if screenGui then local guiElement = screenGui:FindFirstChild("MexicoN1") if guiElement then print("GuiElement found!") guiElement.Text = guiElement.Text + 1 else print("GuiElement not found!") end else print("ScreenGui not found!") end end) ``` Also, don't forget to create a RemoteEvent in ReplicatedStorage and name it "RemoteEvent".