For some reason whenever I try to edit a script it never works. Please help.
local debounce = true function Touch(hit) wait(1.5) local boom = Instance.new("Explosion") local yoshi = game.Workspace.yoshiegg6.Humanoid if debounce == false then return end debounce = false yoshi.sit = true wait (2) yoshi.sit = false boom.Parent = game.Workspace boom.Position = script.Parent.Position boom.DestroyJointRadiusPercent = 0.001 boom.BlastRadius = 5 boom.BlastPressure = 9988888 wait(3) debounce = true end script.Parent.Touched:connect(Touch)
I'm making a mine that repulses my character when you touch it, and makes me sit before it explodes for a more realistic effect. When I touch it it does nothing at all. No sitting, no explosion, nothing. What did I do wrong? The output says yoshiegg6 is not a part of the workspace.
If you are testing the script in studio your username would not be "yoshiegg6," It would be "Player1." For testing purposes I suggest that you switch your username to Player1.