New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Gravity prints different values?

Asked by 3 months ago
Edited 3 months ago

local script:

if msg:lower():match("full gravity") then
    local gravity = 197
    print(gravity)
game:GetService("ReplicatedStorage"):WaitForChild("gravity"):FireServer(gravity)
end

server script:

game.ReplicatedStorage:WaitForChild("gravity").OnServerEvent:Connect(function(player,gravity)
    game.Workspace.Gravity = gravity
    print(gravity)
end)

prints:

197

197

vity

why does server script both print 197 and vity?

0
Do you have another script or line of code running elsewhere? I don't see reason for 'vity' to appear than that unless it's your string manipulation alphawolvess 1699 — 3mo
0
where in the heck is vity coming from :thonk:, that is surely from somewhere else starmaq 877 — 3mo
0
i clicked on the prints to know where they come from and both one of the 197's and vity comes from the server script print Gameplayer365247v2 729 — 3mo

Answer this question