New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

Why isn't the property of my part changing after I called the function?

Asked by 12 days ago
Edited 12 days ago

I successfully got the function to work, but the position of the part will not change after waiting 3 seconds. Can you help me?

function myPart(myPosition)
    local part ="Part")
    part.Anchored = true
    part.BrickColor ="Black")
    part.Position = myPosition
    part.Parent = workspace

    return myPart

local myPartData = myPart(,7,1))
myPartData.Position =,7,2)
You're indexing the function, not the part itself. Change line 8 to "return part". BashCaster 2537 — 12d
Thank you :) WolfHasQuack 3 — 12d

Answer this question