My script does that when i touch it, the brick becomes invisible, but im having trouble with the second part.
Here my script:
script.Parent.Touched:Connect(function(hit) if hit.Parent.Name == "WaterEssence" then script.Parent.Transparency = 0.5 wait(20) script.Parent.Transparency = 0 end
This script will work
script.Parent.Touched:Connect(function(hit) if game.Workspace:FindFirstChild(hit.Parent.Name) then if game.Workspace:FindFirstChild(hit.Parent.Name):FindFirstChild("WaterEssence") then script.Parent.Transparency = 0.5 wait(20) script.Parent.Transparency = 0 end
1 - You don't test for the Tool Name, you test if the player that touched have the item in its Model(Player ir holding) or if have on its backpack(Not holding)
Good Luck With your games!!
The thing that I need is just the script to when I touch the brick with the tool it gives EXP
The script that I posted is working well, now I just need to know how to add so I can get EXP when that triggers.
So the thing that I need is that you add this script the function that gives EXP to the player
Am I being clear? Sorry if not, I’m a bit new at scripting