Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I print everyones gravity value?

Asked by
YTWolFs 11
3 years ago
Edited 3 years ago

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!

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago
Edited 3 years ago

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)
0
"hey hey there" aaaaaaaaaaaaaaaaaaaaaaaaaa Xapelize 2658 — 3y
0
i located the gravityprint on the localscript since it's too long and i dont want people to click about the "open source" thing because it's lame lol Xapelize 2658 — 3y
0
ignore my comments here, it's useless for your brain (delete it) Xapelize 2658 — 3y
0
im cringe talking myself to myself what am i even saying goodbye Xapelize 2658 — 3y
0
This only prints my gravity tho... I need it to print everyone in the games gravity. Like Username: 196, OtherUsername: 196 YTWolFs 11 — 3y
Ad

Answer this question