Remote event not working?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    To make the remote event fire and give the player the tool
  2. What is the issue? Include screenshots / videos if possible!
    it doesnt give the player the tool
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    havent found any
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
    Well i dont see any typos heck i checked the folder there is no tool typo
--Server Script in ServerScriptService
local repRemote = game:GetService("ReplicatedStorage")
local repStorage = game:GetService("ServerStorage")
local items = repStorage.Items
local remote = repRemote.GiveGear

remote.OnServerEvent:Connect(function(plr, Message, WindSword)
    if Message == "Giver Gear" then
        items[WindSword]:Clone().Parent = plr.Backpack
--We do the same thing but we change the tool
remote.OnServerEvent:Connect(function(plr, Message, Insert)
    if Message == "Giver Gear" then
        items[Insert]:Clone().Parent = plr.Backpack
end
end)
end
end)
--- Gui Local Script
script.Parent.MouseButton1Click:Connect(function()
    local remote = game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
    remote:FireServer("WindSword")
end)
-- The 2nd Gui Local Script
script.Parent.MouseButton1Click:Connect(function()
    local remote = game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
    remote:FireServer("Insert")
end)

You can’t fire server in a server script, you have to fire the client, like

remote:FireClient(plr)

remote being the specific remote event you want to be fired

wdym? i dont see FireServer in my server script

are you talking about my local scripts?

script.Parent.MouseButton1Click:Connect(function()
    local remote = game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
    remote:FireServer("WindSword")
end)
-- The 2nd Gui Script
script.Parent.MouseButton1Click:Connect(function()
    local remote = game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
    remote:FireServer("Insert")
end)

it says FireServer in this part of the script(remote:FireServer(“WindSword”) and remote:FireServer("Insert))

there local scripts not server scripts

I’m dumb sorry lol I didn’t see that

Your remote needs a parameter of message and windsword which you only pass only one argument

--Parameters needed ( Message, WindSword)
    remote:FireServer("WindSword")

you can do

    remote:FireServer("Giver Gear","WindSword")

Oh ok i see now wait but im going to test it first

why when i click it again it gives me 2 and then i click it again it give me 3 and then 4 ect

@NateOTB its multiplying every time i click it i want it to give me one everytime i click but it gives 2,3,4,5 ect the more i click it the more it multiplies

maybe adding a debounce?
create a table insert the player after you gave the tool to the player .

local Table = {}

remote.OnServerEvent:Connect(function(plr, Message, WindSword)
    if Message == "Giver Gear" and not table.find(Table, plr ) then
        items[WindSword]:Clone().Parent = plr.Backpack
        table.insert(Table , plr) 


okay that worked thx so much you helped me alot thx

That might be dangerous because hackers can use that event to get literally any item as many times as they want.

not if theres no shop then whats the purpose

They can fire it a lot of times really fast and lag the server (Creating a lot of objects). It’s very easy to do something like that

then ill just use a security method in a different script

1 Like

@NateOTB i use the same deounce method on a different script and if i click on the gui button
it gives me one tool but if i click the other gui button with the same debounce method it doesnt give me the tool?

@NateOTB it works welll sort of when i changed the other script to the debounce method i could click one of the gui button it would appear in my backpack but if i click the button gui again it doesnt do anything any fix to this?