You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
To not make both functions add
What is the issue? Include screenshots / videos if possible!
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I couldnt find 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!
Both are local scripts
--local script 1
--Variables
local Game = game
local open = false
local sp = script.Parent
local sps = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.GearLabel
local spss = Game:GetService("ReplicatedStorage"):WaitForChild("Items")["RainbowMagicCarpet"]
local spsss = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.Equip
local spssss = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.ItemName
local FRemote = Game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
local Frame = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify")
--Functions
spsss.MouseButton1Click:Connect(function()
if open then
print("Remote Fired")
FRemote:FireServer("Remove Gear","RainbowMagicCarpet")
open = false
spsss.Text = ("Equip")
spsss.BackgroundColor3 = Color3.new(85/255, 255/255, 127/255)
else
print("Remote Fired")
FRemote:FireServer("Giver Gear","RainbowMagicCarpet")
open = true
spsss.Text = ("Unequip")
spsss.BackgroundColor3 = Color3.new(226/255, 0/255,40/255)
end
end)
sp.MouseButton1Click:Connect(function()
Frame.Visible = true
sps.Image = spss.TextureId
spssss.Text = ("RainbowMagicCarpet")
end)
-- local script 2
--Variables
local open = false
local sp = script.Parent
local Game = game
local sps = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.GearLabel
local spss = Game:GetService("ReplicatedStorage"):WaitForChild("Items")["CrescendoTheSoulStealer"]
local spsss = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.Equip
local FRemote = Game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
local spssssss = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.ItemName
local Frame = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify")
--Functions
spsss.MouseButton1Click:Connect(function()
if open then
print("Remote Fired")
FRemote:FireServer("Remove Gear","CrescendoTheSoulStealer")
open = false
spsss.Text = ("Equip")
spsss.BackgroundColor3 = Color3.new(85/255, 255/255, 127/255)
else
print("Remote Fired")
FRemote:FireServer("Giver Gear","CrescendoTheSoulStealer")
open = true
spsss.Text = ("Unequip")
spsss.BackgroundColor3 = Color3.new(226/255, 0/255,40/255)
end
end)
sp.MouseButton1Click:Connect(function()
Frame.Visible = true
sps.Image = spss.TextureId
spssssss.Text = ("CrescendoTheSoulStealer")
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
I don’t understand the problem is the equip/unequipped getting a different tool?
Can you explain the problem the only problem I saw is that you got different tool.
The reason why I want to see the server script for the remote event is because that is where you remove the tools and add tools. I don’t really see the problem for the local script it.
if you would like to see the variables they both have the same variables
--Variables
local Game = game
local open = false
local sp = script.Parent
local sps = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.GearLabel
local spss = Game:GetService("ReplicatedStorage"):WaitForChild("Items")["RainbowMagicCarpet"]
local spsss = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.Equip
local spssss = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify").GearFrame.ItemName
local FRemote = Game:GetService("ReplicatedStorage"):WaitForChild("GiveGear")
local Frame = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Roundify")
local repRemote = game:GetService("ReplicatedStorage")
local repStorage = game:GetService("ReplicatedStorage")
local items = repStorage.Items
local remote = repRemote.GiveGear
local Table = {}
remote.OnServerEvent:Connect(function(plr, Message, item)
if Message == "Giver Gear" and item then
items[item]:Clone().Parent = plr.Backpack
items[item]:Clone().Parent = plr.StarterGear
elseif Message == "Remove Gear" and plr.Backpack:FindFirstChild(item) then
plr.StarterGear[item]:Destroy()
plr.Backpack[item]:Destroy()
end
end)