Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do make a unancored part be ancored do something? [closed]

Asked by 3 years ago

IDK any coding soooooooooooooooooooooooooooooooooooooooooooooooo...............................uhhhhhhhhhh.....................hmmmmmm...........yeah? Pls help me or els imma die.

0
What? squidiskool 208 — 3y
0
put a script inside of a a part and type this: script.Parent.Anchored = true Brycefitz2008 2 — 3y

Closed as Not Constructive by Ziffixture

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Uh, here?

function onTouched(hit)
    if script.Parent.Anchored == false then
        script.Parent.Anchored = true
    end
end

script.Parent.Touched:connect(onTouched)
Ad
Log in to vote
0
Answered by
2_MMZ 1059 Moderation Voter
3 years ago

So what you'll need to do is insert a regular Script in the part that will be your target. Inside of that Script, type:

local part = script.Parent

if part.Anchored == false then
part.Anchored = true
end