i made a simple robbery system for noobs of scripting
u need to make a part insert a proximity promt and a script
later you delete print hello world and put this :
local Prize = math.random(145, 3545)
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
player.leaderstats.Money.Value = player.leaderstats.Money.Value + Prize
script.Parent.ProximityPrompt.Enabled = false
game.ReplicatedStorage.RoberySuccess:FireClient(player, Prize)
wait(math.random(46, 145))
script.Parent.ProximityPrompt.Enabled = true
end)
later u instert a remote function in replicated storage called RoberySucces
and you have it
I think for this to be more useful to noobs, along with the formatting suggested here already, you’ll also need to tell them where to put the script(type of script/localscript) and where to put the proximity prompt within the Studio game explorer.
Also, what is RoberySuccess, how do you create that? (I’m not asking, I’m saying a noob will ask this). Where is this function that is being fired?
What are you robbing? Is this in an NPC, a cash register brick or model? Another player?