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

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

Asked by 6 years ago
Edited 6 years ago

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

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago
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)
Ad

Answer this question