Hello! How do I make a script that when I press a button, it prints everyones gravity number? I've tried looking on forums for similar topics but I can't find anything anywhere. Please help!
Hey hey there, you should use a remoteEvent, a script and a LocalScript
about an remoteEvent, put it in ReplicatedStorage and name it "GravityPrint" or whatever
put script inside the clickdetector
put localscript in StarterPlayer > StarterPlayerScripts
now about the script:
local ClickDetector = script.Parent ClickDetector.MouseClick:Connect(function() game:GetService("ReplicatedStorage").GravityPrint:FireAllClients() end)
that's basically it, it fires all the clients when clicked, now localscript:
local GravityPrint = game:GetService("ReplicatedStorage").GravityPrint GravityPrint.OnClientEvent:Connect(function() -- if they detect an event fires print(game.Workspace.Gravity) end)