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

[SOLVED] How can I get my tool giver (gives tool by id) to work?

Here is my explorer setup (everything you see is in a Gui in StarterGui): gyazo.com/8f3247dcac955cd01e5dc414f3bf1ee8 If link doesn't work, you may have to paste it into a different browser

--client
local text = script.Parent.Parent.TextBox.Text
local value = script.Parent.Parent.AssetID.Value
local Event = script.Parent.Parent.ToolGiver.GoPressed
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	value = text
	Event:FireServer(player)
end)
--server
local assetid = script.Parent.AssetID.Value

script.GoPressed.OnServerEvent:Connect(function(player)
	wait()
local tool = game.InsertService:LoadAsset(assetid)
if tool:IsA("Tool") then 
		local clone = tool:Clone()
		clone.Parent = player.Backpack 
end
end)


1 comment

1

InsertService:LoadAsset(assetid) --Loads a model.

1 answer

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