I'm attempting to create a shop that you can buy tools from after collecting enough of the in game currency-"fish" however, when I collect the required amount of fish and click the purchase button nothing happens.
Here's the script and the error message I'm getting.
game.ReplicatedStorage.toolevents.swordevent.OnServerEvent:Connect(function(player)
if player.leaderstats.fish.Value >= 250 then
player.leaderstats.fish.Value = player.leaderstats.fish.Value - 250
game.ServerStorage.tools.sword:Clone().Parent = player.Backpack
end
end)
game.ReplicatedStorage.toolevents.gun.OnServerEvent:Connect(function(player)
if player.leaderstats.fish.Value >= 750 then
player.leaderstats.fish.Value = player.leaderstats.fish.Value - 750
game.ServerStorage.tools.gun:Clone().Parent = player.Backpack
end
end)
game.ReplicatedStorage.toolevents.rocket.OnServerEvent:Connect(function(player)
if player.leaderstats.fish.Value >= 1000 then
player.leaderstats.fish.Value = player.leaderstats.fish.Value - 1000
game.ServerStorage.tools.rocket:Clone().Parent = player.Backpack
end
end)
ParentMouseButton1Click is not a valid member of LocalScript "Players.ITheol.PlayerGui.shop.Frame.sword.fireevent"
