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

Why isn't my mine script working?

Asked by
yoshiegg6 176
10 years ago

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.

1 answer

Log in to vote
0
Answered by
52M 10
10 years ago

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.

Ad

Answer this question