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
local tags = game:GetService("CollectionService")
local reqscript = script.Parent
local module = require(reqscript)
function playeradd(player)
local playership = module.new(player)
tags:AddTag(playership,tostring(player.UserId).."Ship")
end
game.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