Hey Devs! I’m making a tool that’s spawning parts when clicked. I added a “properties” GUI to change the part’s properties. Everything is in local scripts, so I need to make a script in the tool or send the .Anchored value from the button to the tool or in a different way.
What do I want to achieve? If I click the button, .Anchored value must change from false to true to spawn the part with that value. (Parts create by a tool!)
What is the issue? The .Anchored value isn’t changing.
What solutions have I tried so far? I tried making many scripts in the tool, button. I tried using events and Boolvalues, but nothing worked. I searched the internet too. Thanks for all the answers!
You would need to create a BoolValue/Attribute, clicking the button changes the Value/Attribute, and you will just need to set Part.Anchored to the attributes value.
I’m not sure if I’m reading your question right, but the script is setting the “Anchored” property to false when you say you want it to be true. Switch “false” to “true”
So what you want to do is have it spawn the part anchored or not depending on the setting? set a variable like “anchor” to false outside of the functions (below the GUI variable). In the “AnchorTrue” function, write “anchor = not anchor”, and have the “create part” function set the part’s Anchored property to the “anchor” variable