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

Why can't I replicate a tool into StarterGear?

I'm working on a saving system for my RPG. I've got the script below that is fired by an event.

game.Lighting.ServerEvents.SpawnWeaponShop.T1S1.OnServerEvent:connect(function(Player)
game.Players[Player.Name].leaderstats.Gold.Value - 150
local Weapon = game.ReplicatedStorage.ITEMS.BrigandSword:Clone()
Weapon.Parent = Player.StarterGear
end)

It works in studio, but not in-game. What could I do to make it work in-game?

1 answer

Hi, there.

Your script is using filtering enabled as seen by you remote event. I do suggest that you clone your weapon in the server script which activates this Server Event since I don't think you can clone in a local script. Also, it seems you have put your weapon into starter gear. I not very sure, but if you are trying to put the weapon into backpack, you should place inside Player.backpack.

2 comments

0

Yes, that is the ServerSided script running that and I'm trying to get the tool into StarterGear. Is that not possible?

0

Startgear only works when the player joins the game. You should change Weapon.Parent to player’s backpack.

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