I am currently making a Trail shop, the shop will have the Trails then the purchase menu on the side
When you click on a trail it sends the trail name and the value to a string and int value, that part works.
When I fire the event, it doesn’t fire the trail name and correct value, therefore as a result of that the server script doesn’t get the right values
GUI purchase click function:
function Clicked()
click:Play()
if ownedtrails:FindFirstChild(TrailName) then
wait(1)
print("Equipped trail "..TrailName)
EquipTrail:FireServer(TrailName,TrailCost)
else
if player.leaderstats.Points.Value >= TrailCost then
print("Purchased trail for " ..TrailCost.. " Points")
EquipTrail:FireServer(TrailName,TrailCost)
end
end
end
script.Parent.MouseButton1Click:Connect(Clicked)
On server event in server script:
EquipTrail.OnServerEvent:Connect(function(player,TrailName,TrailCost)