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

My script wont add values when I scripted it to? Anyone have a fix?

Asked by 6 years ago

This script that is meant to add followers wont work. Any fixes?


game.Players.PlayerAdded:Connect(function(plr) if Workspace.StarterItemsUpgraded.StarterMonitorUpgraded.ScreenGui.Enabled == true then wait(math.random(1, 2)) plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + 1 elseif plr.leaderstats.Followers.Value >130 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(1,2) elseif plr.leaderstats.Followers.Value >250 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(1,3) elseif plr.leaderstats.Followers.Value >350 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(1,4) elseif plr.leaderstats.Followers.Value >410 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(2,4) elseif plr.leaderstats.Followers.Value >500 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(2,5) elseif plr.leaderstats.Followers.Value >600 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(2,6) elseif plr.leaderstats.Followers.Value >700 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(2,7) elseif plr.leaderstats.Followers.Value >775 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(3,7) elseif plr.leaderstats.Followers.Value >845 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(3,8) elseif plr.leaderstats.Followers.Value >950 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(3,9) elseif plr.leaderstats.Followers.Value >1150 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(3,10) elseif plr.leaderstats.Followers.Value >1450 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(3,11) elseif plr.leaderstats.Followers.Value >1750 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(3,12) elseif plr.leaderstats.Followers.Value >2000 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(4,12) elseif plr.leaderstats.Followers.Value >2300 then plr.leaderstats.Followers.Value = plr.leaderstats.Followers.Value + math.random(4,13) end end)
0
dammmmm User#23365 30 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

its because your doing:

Workspace.StarterItemsUpgraded.StarterMonitorUpgraded.ScreenGui.Enabled

and ScreenGuis are not 3D, they are 2D on the players screen not in the 3D world, so instead use SurfaceGuis. Also the global variable of workspace shouldnt be capitalized, since thats for the datamodel of workspace game.Workspace

Ad

Answer this question