I am trying to make a code so that when the player’s mouse hovers over a block, another block appears on top of the block. I have put a script into the part. Here is my code:
local ClickDetector = script.Parent.ClickDetector
ClickDetector.MouseHoverEnter:Connect(function()
game.Workspace.PlantExample.Position = script.Parent
end)
ClickDetector.MouseHoverLeave:Connect(function()
game.Workspace.PlantExample.Position = game.Workspace.PlantExampleStay
end)
I have put this code in a script(Not local) in Workspace. Workspace has filtering enabled, disabled.
Here is what my game looks like in the explorer tab:
\/ Workspace
Baseplate
\/ Placing1
ClickDetector
Script (Where my code above is)
Part
PlantExample
PlantExampleStay

5 comments
Yes...I forgot to put in the .position. Thanks TheBigBro122
Alrighty, no problem... You could make the post as a solution if you want, I'll really appreciate it
How do I close my response... It’s my first time using this
Or I mean how do I make your solution, a solution?
Oh I got it...