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.


script.Parent.Touched:Connect(function(Hit)
	if Hit.Parent.Name == 'Hamburger' then
		Hit.Parent:Destroy()
		script.Parent.Ding:Play()
		script.Parent.Parent.PlatedBurger.Transparency = 0
		wait(6)
		script.Parent.Parent.PlatedBurger.Transparency = 1
	end
end)

8 comments

0

FORMAT

0

pls

0

Please code block your script

0

I fixed the code block! Sorry for the inconvenience.

0

Not sure what your asking?

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.

0

if tool.equipped then

0

Thank you!