Player walk up to part SCRIPT needs help!

Hello again developers! I have designed a simple part script that upon clicking a part, it waits a second and destroys the part.

local High = script.Parent.Highlight
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://138108873"
sound.Parent = Part
local player = game.Players.LocalPlayer

Part.ClickDetector.MouseHoverEnter:connect(function()
	High.Enabled = true
	
	Part.ClickDetector.MouseClick:connect(function()
		wait(1)
		Part:Destroy()

	end)
end)
Part.ClickDetector.MouseHoverLeave:connect(function()
High.Enabled = false
end)

Although it looks off knowing the player sort of jump breaks it with their mind. I wish I could make it so the player walks up to the part and faces it before they destroy it so I can add a breaking animation later!

NEVERMIND! I realized I was doing client things for a script inside a part. Sorry!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.