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.

3 comments

0

Post the whole thing

0

Ok

0

so close to 100,000