Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make item delete from player starterpack if they are not in the specific team?

Help! i don't know if i did anything wrong and if you help i would be appreciated and i can learn from it :)

Yes = "Supreme Being"

function search(obj)v.Name="Fireball"then

if plr.TeamColor ~= game.Teams[Yes].TeamColor then

end

else

v:Destroy()

end

end

end

search(game.StarterPack)

1 answer

✓ Accepted answer

Actually as I saw your script I will give you a working one. Insert this one in ServerScriptStorage.

Team = "Supreme Being"
function Find()
for _,p in pairs (game.Players:GetChildren()) do
if p.Team.Name == Team then
else
if p.Backpack:FindFirstChild("Fireball") then
p.Backpack.Fireball:Destroy()
end
if p.StarterGear:FindFirstChild("Fireball") then
p.StarterGear.Fireball:Destroy()
end
end
end
Find()

Hope it helped!

2 comments

0

I also try making it a local,module and a normal script and i tried put it everywhere, but thanks for helping me i really appreciated it!

0

anyway it says Workspace.Script:14: 'end' expected (to close 'function' at line 2) near ''

This discussion is preserved as it was. New answers, comments, and votes are closed.