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

Why is my part not anchoring once it hits it's specific location?

Once it the part (Bomb) hits the position it's supposed to hit, it should anchor. But, it won't anchor, but instead I'll get an error once the part hits the ground that says,

"ServerScriptService.BombDropScript:10: attempt to call a Vector3 value."

Script I did:

local bomb = game.Workspace.Bomb local rope = game.Workspace.Rope

wait(5)

bomb.Anchored = false rope.Transparency = 1 rope.Fire.Size = 2

if bomb.Position (-56, 2, -12) then bomb.Anchored = true end

I feel like I'm doing something wrong, but I don't know what it is.

5 comments

0

Do if bomb.Position == Vector3.new(-56,2,-12) then bomb.Anchored = true end

0

@SuperPuiu I tried it and it's not working. Is there any other script I can do?

0

Is this your full code?

0

I spaced things out, but I just took your script, deleted the part that you said was wrong, and put yours in place.

0

The part can't get to the exact position you want it to go. You can try to use touched event connected to a part and then anchor the bomb

1 answer

I tried fixing the script. Try replacing it with this instead.

local bomb = game.Workspace.Bomb
local rope = game.Workspace.Rope

wait(5)

bomb.Anchored = false 
rope.Transparency = 1 
rope.Fire.Size = 2

if bomb.Position = Vector3.new(-56, 2, -12) then 
	bomb.Anchored = true 
end

It should work normally. Tell me if it didn't.

1 comment

0

The bomb would drop, but it wouldn't be anchored. I added the extra "=" for the Vector3, but it still wouldn't anchor.

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