Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Need help with script for increasing scale of a mesh in relation to a leader board int value?

I have a unfinished script for trying to make the scale of a mesh go up every time a leader board value goes up but i dont know how to finish it

local Tool = script.Parent
local player = game.Players.LocalPlayer
local leaderstats = player:FindFirstChild("leaderstats")
local spins = leaderstats.Spins
local spinner = Tool.Handle.Mesh

if spins.Value + 1 then
	spinner.Scale
end



i was looking for the script to add a specific scale for every 1 value ex. if the value is 1 then the scale would be X then when it goes to 2 it's 2X

Any help would be appreciated :P

1 answer

✓ Accepted answer
local Tool = script.Parent
local player = game.Players.LocalPlayer
local leaderstats = player:FindFirstChild("leaderstats")
local spins = leaderstats.Spins
local spinner = Tool.Handle.Mesh

spins.Changed:Connect(function(newValue)
   spinner.Scale = Vector3.new(1,1,1)*newValue
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.