Hey there!
I’m trying to spawn meshparts with a repeat loop but I have a strange errormessage:
This is my script :
local folder = workspace.Game.HipsFolder
local hipsNumber = folder:WaitForChild("NumberOfHips") -- this is an intvalue to count the number of Meshparts
local maxHips = 25
local debounce = false
local module = require(game:GetService("ServerScriptService"):WaitForChild("HipsScripts"):WaitForChild("HipsModule"):WaitForChild("HipsModule"))
repeat
print("spawn Meshparts")
hipsNumber.Value = hipsNumber.Value + 1
until hipsNumber.Value == maxHips.Value -- THE ERROR IS AT THIS LINE OF CODE
And this is the output :
15:04:57.213 - ServerScriptService.HipsScripts.MainHipsScript:10: attempt to index number with 'Value'
15:04:57.213 - Stack Begin
15:04:57.215 - Script 'ServerScriptService.HipsScripts.MainHipsScript', Line 10
15:04:57.215 - Stack End