Hello I am trying to make a system close to the one in rage runner where your name is displayed if you win
i have made a script that will add a win when you hit a part but i want the winning players name to be shown to everyone as well.
this is what i have done so far
local player = game:GetService("Players")
local pad = script.Parent -- Path to coin
local notify = game.ReplicatedStorage.Notify
local used = false
function giveCoin(part)
if part.Parent:FindFirstChild("Humanoid") == nil or used == true then
return
end
used = true
local player = player:GetPlayerFromCharacter(part.Parent)
player.leaderstats.Wins.Value = player.leaderstats.Wins.Value + 1
pad:Destroy()
end
pad.Touched:Connect(giveCoin)
the notify variable is a stringValue in replicated storage and i want the value of notify to change to the players name when they hit the block
can you help me
thanks :)
