local p1 = Instance.new(“ParticleEmitter”)
p1.Size = NumberSequence.new({
NumberSequenceKeypoint(),
NumberSequenceKeypoint(.5,.4,0),
NumberSequenceKeypoint(1,0,0),
})
false Players.Player.PlayerGui.ScreenGui.MainLocalScript:276: attempt to call global ‘NumberSequenceKeypoint’ (a table value)
Can someone please explain to me the right way to use it? That’s how the roblox wiki seems to say you should do it.
1 Like
As8D
(as8d)
December 25, 2015, 2:04am
#2
Well, the only problem here is that NumberSequenceKeypoint is an instance too - it uses the .new constructor function.
NumberSequence.new(NumberSequenceKeypoint.new(time, value, envelope), ...)
But yeah, the wiki is poorly documented on this part - though with autocompletion in the Script Editor in studio, you would eventually run into realizing it uses the .new constructor.
6 Likes
Thank you!!! Yeah they really should include .new after it considering they do for everything else that uses it. I got stumped on that for too long.
1 Like
Forummer
(Forummer)
December 14, 2021, 10:56am
#4
Just keeping the links posted in the thread up to date.
local p1 = Instance.new("ParticleEmitter")
p1.Size = NumberSequence.new({
NumberSequenceKeypoint.new(),
NumberSequenceKeypoint.new(0.5, 0.4, 0),
NumberSequenceKeypoint.new(1, 0, 0)
})
The fix applied to the provided code, remember that the last item in an array does not require a comma after it.
1 Like