Why isn't value info firing on the remote event?

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
image

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)
2 Likes

Where is TrailCost and TrailName declared?

Its declared in the GUI
(30 chrs)

Could you show the script lines where you declared it?

I solved it myself its fixed now, thanks though.