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

Gravity prints different values?

Asked by 4 years ago
Edited 4 years 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 1784 — 4y
0
where in the heck is vity coming from :thonk:, that is surely from somewhere else starmaq 1290 — 4y
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 1055 — 4y

Answer this question