Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Collection Service not working on Meta-tables?

Asked by 6 years ago
1local tags = game:GetService("CollectionService")
2local reqscript = script.Parent
3local module = require(reqscript)
4function playeradd(player)
5local playership = module.new(player)
6tags:AddTag(playership,tostring(player.UserId).."Ship")
7end
8game.Players.PlayerAdded:Connect(playeradd)

output says unable to cast value to object. I have seen meta-tables used with the collection service before.

0
because AddTag's arguments are invalid... and indent your code before doing anything else User#19524 175 — 6y
0
I made sure playership ~= nil and also this isnt my whole set of code this is an example the real set is indented.line 6 is copied and pasted. As i said before i found a roblox staff member using OOP objects and the collection service together. 129Steve129 7 — 6y
0
Never Mind I found a different way to do what I needed to do. 129Steve129 7 — 6y

Answer this question