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

What is the script for a gui that gives tools? the old scripts aren't working. [closed]

Asked by
bluense -10
6 years ago

So I'm new to scripting and I'm really looking for a scripting helper because I'm trying to make a button that gives tools. So this is what I found.

local player = game.Players.LocalPlayer local tool = game.ServerStorage.AdventureIsland

script.Parent.MouseButton1Click:connect(function() tool:Clone().Parent = player.Backpack script.Parent.Parent.Parent:Destroy() end)

Does this work? I tried didn't work for me. It would be great if someone helps me.

0
Looks like this is a LocalScript. LocalScripts cannot access ServerStorage. You should put the sword in ReplicatedStorage and use RemoteEvents to clone the sword into the player's backpack. Have it fire after the button is clicked. ProtectoidZ 42 — 6y
0
Use a code block and use :Connect as :connect is deprecated. MythicalShade 420 — 6y

Closed as Not Constructive by User#19524

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?