game.Players.PlayerAdded:Connect(function(plr)
game.Workspace:WaitForChild(plr.Name)
game.Workspace[plr.Name]:WaitForChild('Humanoid')
local ownsmusic = Instance.new('BoolValue', plr)
ownsmusic = false
ownsmusic.Name = 'ownedmusic'
local gotspeed = Instance.new('BoolValue', plr)
gotspeed = false
gotspeed.Name = 'ownedspeed'
if gamepasses:PlayerOwnsAsset(plr, '6180493') then
print('Thanks for donating!')
end
if gamepasses:PlayerOwnsAsset(plr, '6180525') then
ownsmusic = true
print('MusicOn')
end
if gamepasses:PlayerOwnsAsset(plr, '6180479') then
gotspeed = true
print('SpeedOn')
end
end)`
This script returns the error: 'Attempt to index local 'ownsmusic' (a boolean value)' at line 7. Why?