Hi, I’m trying to make a button on a gui that activates and fires a RemoteEvent. However, this button just does not want to activate. It has that thing when you hover over it and it becomes darker, so I know there’s nothing blocking it, yet pressing it does nothing. In fact, the button right next to it, with the same parent, works.
local RepStorage = game:GetService("ReplicatedStorage")
local BuyEvent = RepStorage:WaitForChild("BuyEvent")
local PlayerGui = game:GetService("Players").LocalPlayer.PlayerGui
local ValPriceLabel = PlayerGui:WaitForChild("buyValGui").Cost
local cornGui = PlayerGui.GameStats.Frame:WaitForChild("cornamountlabel")
script.Parent.Activated:Connect(function()
print("Buy button pressed, firing signal")
BuyEvent:FireServer()
end)
BuyEvent.OnClientEvent:Connect(function(ValPrice,cornStat)
ValPriceLabel.Text = tostring(ValPrice).." Corn"
cornGui.Text = tostring(cornStat)
end)