This script is inside the player's "Rebirth Gui", but it doesn't work .. The problem is probably inside the condition, but where ?! Please help..
script.Parent.MouseButton1Click:Connect(function() --on Player Click Buy..
local player = script.Parent.Parent.Parent.Parent.Parent --player
--//Variables//--
local gui = player.PlayerGui--gui
local Rgui = gui.RebirthGui--Rgui
local data = player.Data --data
local money = data.Money.Value --money
local rcoins = data.rcoins.Value --rcoins
local me =script.Parent
local roud = me.TextButton_Roundify_12px
local prize = script.Parent.Parent.Parent.prize.Value
local frame = me.Parent
local notEnoughCoins = frame.notEnoughCins
local transfer = frame.transfer
local hrac = game.Workspace[player.Name]
local head = hrac:WaitForChild("Head")
local howMuch = script.Parent.Parent.Parent.howMuch.Value
--local buySound = head:WaitForChild("buySound") --Add sounds soon....
--/SCRIPT/--
if money > prize then
money = (money - prize)
rcoins = rcoins + (howMuch * 1800)
end
end) --End

1 comment
You should've put more details like what you want it to do and in which line it errored etc.