FireAllClients doesn't effect all clients but only the one that called the function (any fix?)
local db = false
local Prize = script.Parent.Parent.Info.Prize
script.Parent.Touched:Connect(function(hit)
if db == false then
db = true
if hit.Parent:FindFirstChild("Humanoid") then
print("Found a player")
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + Prize.Value
player.DoingObby.Value = false
game.Workspace.Sounds.Success_Sound:Play()
game.ReplicatedStorage.ObbyMapRewardNotification.WinNotification:FireAllClients(Prize.Value,script.Parent.Parent.Info.Prize.CurrencyName.Value, script.Parent.Parent.Name)
hit.Parent.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.Spawn.SpawnPoint.SpawnLocation.Position + Vector3.new(0,7,0))
game.ReplicatedStorage.ObbyMapRewardNotification.RewardNotification:FireClient(player,Prize.Value,script.Parent.Parent.Info.Prize.CurrencyName.Value, script.Parent.Parent.Name)
game.ReplicatedStorage.ObbyLockEvents.Lock:FireClient(player)
wait(0.5)
db = false
end
end
end)