in my game the player spawns on a ball and rolls around the map collecting little slimes. i want the ball to increase in size by 1 every time an item is rolled over.
the ball is just a sphere in server storage that the player spawns on.
the code for the collectable item looks like this so far(it only collects when a humanoid touches it, but i would like the thing to be collectable by the ball too.):
local player = game:GetService("Players")
local size = script.Parent
local used = false
function giveCoin(part)
if part.Parent:FindFirstChild("Humanoid") == nil or used == true then
return
end
used = true
local player = player:GetPlayerFromCharacter(part.Parent)
player.leaderstats.Size.Value = player.leaderstats.Size.Value + 1
size:Destroy()
end
size.Touched:Connect(giveCoin)
im not sure how to increase the size of the ball when the size value increases.
