so i am currently fixing a kind of neon thingy to my music visualizer. And I have to earn Robux in a way. I made a gamepass to neon stuff idk what i should call it but When you own the gamepass you dont get neon.
This is the serverscript:
local Model = game.Workspace.Visualizer
local MarketplaceService = game:GetService("MarketplaceService")
local GamepassId = 11926975
game.Players.PlayerAdded:Connect(function(player)
if game:GetService("GamePassService"):PlayerHasPass(player, GamepassId) then
script.Parent.MouseButton1Click:Connect(function()
Model.Part1.Material = "Neon"
Model.Part2.Material = "Neon"
Model.Part3.Material = "Neon"
Model.Part4.Material = "Neon"
Model.Part5.Material = "Neon"
Model.Part6.Material = "Neon"
Model.Part7.Material = "Neon"
Model.Part8.Material = "Neon"
Model.Part9.Material = "Neon"
Model.Part10.Material = "Neon"
Model.Part11.Material = "Neon"
end)
else
print("Player Has Not Gamepass")
end
end)
It does not give any errors. So What did i wrong? Would Appericate Help (sorry for my bad english)

3 comments
I also used the Enum material instead of the name in a string
thats good @WideSteal321. But does this work In studio?
Yes, it does work in studio.