I'm currently making a game with a job that requires you to mop floors with a sponge, I have no idea how to make it so that when you click a dirty part with a sponge, it gives you points and the part's transparency is set to 1, I tried looking online but nothing helped. Here's some video footage of the almost finished job so that it's easier for you to help me. (https://streamable.com/kgedln)
I tried doing it in a localscript (parent is the tool (SPONGE)) but then just gave up
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Dirt1 = game.Workspace.DirtStains.Dirt1
local Dirt2 = game.Workspace.DirtStains.Dirt2
local Dirt3 = game.Workspace.DirtStains.Dirt3
local Dirt4 = game.Workspace.DirtStains.Dirt4
Mouse.Idle:Connect(function()
if Mouse.Target == Dirt1 or Dirt2 or Dirt3 or Dirt4 then
game.Players.LocalPlayer.leaderstats.Money.Value + 15
end
end)
Thank you!

2 comments
Yes, thank you! Exactly what I needed, I never though someone would put so much effort into answering a question like this, you're awesome!
No problem!