Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I fix this broken script where a mesh unanchors, turns visible, and falls on you?

I have just recently learned how to script and I'm having trouble figuring out what is wrong with this script

              Here is the script
local hi = script.Parent

hi.ClickDetector.MouseClick:Connect(function()
	game.ReplicatedStorage.a.Anchored = false
	game.ReplicatedStorage.a.Transparency = 0
end)

Thank you in advance!

1 answer

Nothing is wrong with this script, yet this question lacks details, we really can't help you with the amount of information you give us, like, what IS exactly "not working"?

The only thing that seems ODD is that, the supposed mesh that is falling on the player, which is called "a", is located in "game.ReplicatedStorage", If you want your part to show on the map it must be located in the Workspace, so maybe try this?

local hi = script.Parent

hi.ClickDetector.MouseClick:Connect(function()
    local mesh = game.ReplicatedStorage.a
    mesh.Parent = game.Workspace
    mesh.Anchored = false
    mesh.Transparency = 0
end)

If that isn't the problem tho, we will need more information to actually be able to help you.

This discussion is preserved as it was. New answers, comments, and votes are closed.