Hello Viewers, I'm trying to create a game where after a second gravity goes down by 1, with this I also created values to try and show each player's gravity, however upon testing my script and spending hours trying to fix it, nothing worked, sorry if I don't provide enough information but any help is appreciated.
Thanks for your help!
Script: (Local) game.StarterPlayer.StarterPlayerScripts
game.Workspace.Gravity = 500 local leaderstats = game.ReplicatedStorage.leaderstats local plr = game.Players.LocalPlayer while wait(1) do local gravity = game.Workspace.Gravity game.Workspace.Gravity = game.Workspace.Gravity -1 leaderstats:FireServer(plr, gravity) end
ServerScriptService
local leaderstats = game.ReplicatedStorage.leaderstats leaderstats.OnServerEvent:Connect(function(plr, gravity) if plr:FindFirstChild("leaderstats") then while wait(1) do plr.leaderstats.Gravity.Value = gravity end end end)