Text pop up after script runs help (Solved)

local Prizes = {
	125,
	125,
	125,
	125,
	125,
	250,
	250,
	250,
	500,
	500,
	750,
	750,
	1000
}

script.Parent.ProximityPrompt.Triggered:Connect(function(Player)
	local randomEntry = Prizes[math.random(1, #Prizes)]
	
	Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + randomEntry
	script.Parent.ProximityPrompt.Enabled = false
	wait(math.random(240,300))
	script.Parent.ProximityPrompt.Enabled = true
end)

So I want to make it so when after u robbed a atm a text pops up and says “You just robbed … amount of cash” on those 3 dots the amount of cash pops up.

make a remote event and fire it to the player who robbed the atm, then connect it to a function in local script to pop up the UI… for the text part, put this
script.Parent.Text = “You just robbed'..amount.."amount of cash”
and put a parameter for amount…

Honestly if I knew how to do that I would do it, but I don’t so lol.

alr then, you can wait for few mins while I type the script…

Oh my god, thank you so much, I’ll be patient!

Server Script
local Prizes = {
	125,
	125,
	125,
	125,
	125,
	250,
	250,
	250,
	500,
	500,
	750,
	750,
	1000
}

script.Parent.ProximityPrompt.Triggered:Connect(function(Player)
	local randomEntry = Prizes[math.random(1, #Prizes)]
	game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent"):FireClint(Player, randomEntry)
	Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + randomEntry
	script.Parent.ProximityPrompt.Enabled = false
	wait(math.random(240,300))
	script.Parent.ProximityPrompt.Enabled = true
end)
Local Script
game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent").OnClientEvent:Connect(function(v1)
script.Parent.Visible = true
script.Parent.Text = “You just robbed'..v1.."amount of cash”
end)

parent local script under UI and create a remote event in replicated storage and replace your server script with this one…

Where does the localscript go=

chars thing

umm as I said in post 7, it goes under the UI that should pop up

alr got it, thank you very much for scripting it

np :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.