local player = game.Players.LocalPlayer
repeat wait() until player.Character
local char = player.Character
script.Parent.MouseButton1Click:Connect(function(plr)
if player.leaderstats.Cash.Value == 500 then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 500
print("All players are jumping for 1 min")
end
end)
this is my script i know that i need to do server event but what will i script to make all the players jump?
for _,p in pairs(game.Players:GetPlayers())do--Gets all players
if p.Character then--Checks if the character exists
p.Character:WaitForChild("Humanoid").Jump = true--Tries to find the humanoid, and if it succeeds, the character will jump.
end
end
--Must be in a server script.
--This will make all the players jump.
Sorry if I made any mistakes, and have a nice day.
You can fire all clients with a remote. To fire all clients, you need a server script. You could send data to all the clients. For example: name.
You can create your own GUI, that will pop up when it happens, or you can send a notification through StarterGui:SetCore()
Here: https://developer.roblox.com/en-us/api-reference/function/StarterGui/SetCore
Have a nice day.
Edit: The StarterGui:SetCore() notification works on the client, but not on the server.
Search SendNotification in the page. You can do one notification GUI yourself, and make a localscript, that will modify it’s things. For example: Textlabel’s text.