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

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

Asked by 2 years ago
Edited 2 years ago

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.

0
Do if bomb.Position == Vector3.new(-56,2,-12) then bomb.Anchored = true end SuperPuiu 497 — 2y
0
@SuperPuiu I tried it and it's not working. Is there any other script I can do? EBprince209 0 — 2y
0
Is this your full code? SuperPuiu 497 — 2y
0
I spaced things out, but I just took your script, deleted the part that you said was wrong, and put yours in place. EBprince209 0 — 2y
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 SuperPuiu 497 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

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.

0
The bomb would drop, but it wouldn't be anchored. I added the extra "=" for the Vector3, but it still wouldn't anchor. EBprince209 0 — 2y
Ad

Answer this question