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

Point system not adding up with boost in game!?

Asked by 5 years ago

So I'm making this simulator and the points(popularity) you earn for a click should be (currency.Value) + 1 + boost.Value and you earn boost by buying stuff.But when I change the bosst to like 70 it still gives me +1 currency value.Plz help!

Script:

local tool = script.Parent

local debounce = false

tool.Activated:Connect(function()
    local char = tool.Parent
    local player = game.Players:GetPlayerFromCharacter(char)
    if not debounce then
        debounce = true
        local stats = player:WaitForChild('leaderstats')
        local popularity = stats:WaitForChild('Popularity')
        local boost = stats:WaitForChild("Boost")
        if popularity and boost then
            popularity.Value = popularity.Value + (boost.Value + 1)
            print(boost.Value)
            wait(.5)
            debounce = false
        end
    end
end)
0
well first off all, you never changed the boost value with the script theking48989987 2147 — 5y
0
use a local script Wicked_Wlzard 110 — 5y
0
so when you say "change the boost to 70", do you mean with the command bar? theking48989987 2147 — 5y
0
V3N0M_Z, no, using a local script will probably hurt his cause more than help it, as changes to objects on a local script aren't replicated to the server theking48989987 2147 — 5y
View all comments (3 more)
0
That is true, he should use client to server events to make it fully clean Wicked_Wlzard 110 — 5y
0
ehh, depends on what you mean by fully clean theking48989987 2147 — 5y
0
like after taking a sponge bath with spongebob clean Gey4Jesus69 2705 — 5y

1 answer

Log in to vote
1
Answered by
xEmmalyx 285 Moderation Voter
5 years ago

Make sure when you make the change you change Roblox Studio to server instead of client or else the changes will be equivalent to using a localscript to change the values.

Image

0
It worked if I change it to script and change the boost with a script and not explorer it will show up when I check the server and not just the client. MahadTheIronSword 98 — 5y
Ad

Answer this question