I don’t understand why does the script stops even though it doesn’t have a breaking logic or any error results in my output.
This is the module function:
function module:ApplyBuff(thisPlayer : Player)
local Character = thisPlayer.Character or thisPlayer.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
local parentTo = Character:FindFirstChild("HumanoidRootPart") --# Head? Torso?
--# Apply Stats
print("SSSS")
if Humanoid then
print("Hello")
print(module["BuffedStats"])
for buffName, buffValue in pairs(module["BuffedStats"]) do
warn(buffName, buffValue)
Humanoid[buffName] += buffValue
print(thisPlayer.Name, "has been buffed with " + buffName)
end
print("FOO")
--# Smoke
if module["BuffStyle"].Smoke.Enabled then
local newSmoke = Instance.new("Smoke")
newSmoke.Size = module["BuffStyle"]["Smoke"].Size
if module["BuffStyle"]["Smoke"].Rainbow then
applyRainbowColor(newSmoke, "Color")
end
newSmoke.Name = "buff_smoke"
newSmoke.Parent = parentTo
end
print("BAR")
--# Fire
if module["BuffStyle"].Fire.Enabled then
local newFire = Instance.new("Fire")
newFire.Size = module["BuffStyle"]["Fire"].Size
if module["BuffStyle"]["Fire"].Rainbow then
applyRainbowColor(newFire, "Color")
end
newFire.Name = "buff_fire"
newFire.Parent = parentTo
end
else
warn("Humanoid not found when applying stats buff.")
end
end
This is the output when played:
It stops on the first index of the table.