i dont want a seperate server event per item in my shop so im tryna create a way to send over the tool name. problem is it turns nil after going through the event. need help.
I wanna do if tool == Hammer then type thing
LOCAL
local tool = "Hammer"
script.Parent.Activated:Connect(function(player)
game.ReplicatedStorage.Shop:FireServer(player, tool)
print(tool)
end)
SERVER
game.ReplicatedStorage.Shop.OnServerEvent:Connect(function(player, tool)
print("fired")
print(tool)
end)