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

Can anyone help with this buy script? Doesn't enable the script and change the color.

Asked by 4 years ago
Edited 4 years ago

What I'm trying to do is that there is an image in the given place and the image's RGB color is 0,0,0. There's also a stat called power (which has no problem and works.) If the player's power is 100, and player clicked on the "Buy" button it would enable the testhelper script which gives player 5 power every second. That script is also fine and it's disabled.

For short: If player has 100 power and they click "Buy" button it should make the color 255,255,255 and enable the testhelper script.

local player = game.Players.LocalPlayer

if player.leaderstats.Power > 100 then
    game.StarterGui["clicky and backgrundz"].Characters.testhelperchar.ImageColor3 = Color3.fromRGB(255,255,255)
    game.ServerScriptService.testhelper.Disabled = false
end


script.Parent.MouseButton1Click:Connect(function()
if player.leaderstats.Power > 100 then
    game.StarterGui.stuff.Characters.testhelperchar.ImageColor3 = Color3.fromRGB(255,255,255)
    game.ServerScriptService.testhelper.Disabled = false
end
end)

PS: don't mind the names, that's just what I name things.

0
Post the whole thing ChrisTheRobloxPlayYT 256 — 4y
0
Ok RedSoloYT 10 — 4y
0
so close to 100,000 iiDkOffical 109 — 3y

Answer this question