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

How to make TextButton that will unanchor a part?

I want to make TextButton that will unanchor my part, but when I click on the gui my part is still anchored. Nothing is showing up in output. I put LocalScript in TextButton at StarterGui. Here is the script:

local MainGui = script.Parent
local TextButton = MainGui.TextButton

TextButton.MouseButton1Up:Connect(function()
	  game.Workspace.Dice1.Anchored=false
end)

2 comments

0

What exactly is the issue?

0

Try catching the error and editing your question.

1 answer

Hi, your script is correct.

There might be an issue where the dice is welded that's why it doesn't move at all.

local MainGui = script.Parent
local TextButton = MainGui.TextButton

TextButton.MouseButton1Up:Connect(function()
	game.Workspace.Dice1.Weld:Destroy()
	game.Workspace.Dice1.Anchored=false
end)

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