Hey! I'm currently in the process of making a tycoon game. When the player buys the seating, for 5$, it will take away value (which is something I don't know how to do yet). There's an IntValue inside of the money text.
ProximityPrompt:
local remEvent = game.ReplicatedStorage.Remotes:WaitForChild("TakeCashSeating")
script.Parent.Triggered:Connect(function(player)
remEvent:FireClient(player)
end)
LocalScript in StarterGUI:
local remEvent = game.ReplicatedStorage.Remotes:WaitForChild("TakeCashSeating")
remEvent.OnClientEvent:Connect(function()
if script.Parent.ScreenGui.changecolor.currency.money.Value >= 5 then
script.Parent.ScreenGui.changecolor.currency.money.Value = 0
script.Parent.ScreenGui.changecolor.currency.money.Text = s cript.Parent.ScreenGui.changecolor.currency.money.Value
else
script.Parent.ScreenGui.changecolor.currency.errornote.Visible = true
script.Parent.error:Play()
wait(1.1)
script.Parent.ScreenGui.changecolor.currency.errornote.Visible = false
end
end)
Any working answer is appreciated.
