Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] How Do I Give the Player Cash when Script is True?

Asked by 5 years ago
Edited 5 years ago

Hello! I wanted this system to award the player cash that has the gear equipped. How would I make this work on line 2? I don't know how to obtain the player thats holding the gear.

1script.Parent.Touched:Connect(function(Hit)
2    if Hit.Parent.Name == 'Hamburger' then
3        Hit.Parent:Destroy()
4        script.Parent.Ding:Play()
5        script.Parent.Parent.PlatedBurger.Transparency = 0
6        wait(6)
7        script.Parent.Parent.PlatedBurger.Transparency = 1
8    end
9end)
0
FORMAT Feroxidus 83 — 5y
0
pls Feroxidus 83 — 5y
0
Please code block your script DuckyRobIox 280 — 5y
0
I fixed the code block! Sorry for the inconvenience. Ashton011 30 — 5y
View all comments (4 more)
0
Not sure what your asking? Feroxidus 83 — 5y
0
So on line 1 and 2 the player still is holding the gear. I want the player that is holding the gear to be awarded cash. How would I execute this? I'm unsure of how I would tell the script to give it to the player with the gear. Ashton011 30 — 5y
0
if tool.equipped then Feroxidus 83 — 5y
0
Thank you! Ashton011 30 — 5y

Answer this question