I am trying to create my own particle for players to buy a gamepass and get.
I have the premade particles from roblox working. Script:
local passId = 000000000
function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
plr.CharacterAdded:connect(function(char)
local Trail1 = Instance.new("Sparkles")
Trail1.Parent = char:WaitForChild("Left Leg")
local Trail2 = Instance.new("Sparkles")
Trail2.Parent = char:WaitForChild("Right Leg")
end)
end
end)
And I have created my custom particle and placed it in replicated storage, I used this script to test it for when I touch a block.
local rs = game:GetService("ReplicatedStorage")
function onTouch(hit)
local ee = rs.ParticleEmitter:Clone()
if hit.Parent.Torso:FindFirstChild("ParticleEmitter")then
hit.Parent.Torso.ParticleEmitter:remove()
end
ee.Parent = hit.Parent.Torso
end
script.Parent.Touched:connect(onTouch)
But no I am trying to make it so that you get my custom particle when you purchase a gamepass, this is what I have so far, and I am not sure what to do from now.
local passId = 000000000
function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end
local particles = game.ReplicatedStorage.Particles
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
Any help would be much apreciated thank you :)

1 comment
No I'm not sure what to do after 'then'