How to give the player a tool

are you talking about a remote event that you can insert or that script. also is onserverevent a service or an object to insert.

I can’t buy the axe, the point of this is to help me to be able to when I press a button on the shop gui I get charged gold and then get an axe in my hotbar. do you know this game called Jailbreak, beacuse with buying guns it gives me a gui to buy it, then it takes my gold and I get the gun, the only difference is that instead of pressing E I click with my mouse.

This should’ve 100% worked, this is either you haven’t changed the code that I put on to folder and then the stone axe, or it’s an issue on my end. If this is a issue on my end, I’ll recheck my code and see if I can change it.

btw, this is what you should do

local replicatedstorage = game:GetService("ReplicatedStorage")
local Tools = replicatedstorage:WaitForChild("Tools")
local StoneAxe = Tools:WaitForChild("Stone Axe")


Also, the remoteevent must be in ReplicatedStorage, must be the same name as the event, and also you need to do PlayerGui like this

local players = game:GetService("Players")
local player = players:WaitForChild("LocalPlayer")

local playergui = player:WaitForChild("PlayerGui")
local shopgui = playergui:WaitForChild("ShopGui")
local swordoption = shopgui:WaitForChild(--[[ Whatever this is --]] 

You also need to change the name of the ā€œShopGUIā€ if your screengui shop name is not it.

1 Like

I don’t know if this is too much to ask, but could you please tell me from the beginning what to do, where to put the scripts, and where to put remote events and things. Thank you.

Ok then, This will take time, I’m gonna check to see if what I’m saying actually works, and I’ll tell you how to do it. I’ll also dm you the file so that you can study it.

Thanks, I am also trying to figure out how to script. I think learning may be ok to do, but finding out how to start learning and where to go is where I’m stuck.

1 Like

Hmm okay, along with the dm I can also show you some sources that you can learn from and can help you.

Here is a good video that explains remote events well btw.

Hello, I got some free time. I finished the file along with I found some more links.

I will DM you the file, but also here is some other videos

Here is a Short fact for FilteringEnabled: FilteringEnabled basically reduces the lag in your game

1 Like