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

Union Part's Size Not Changing. Can Someone Help Me Fix This?

Asked by
epoke466 100
3 years ago

I am making a zone that kills players for my battle royal game. The zone shrinks overtime and eventually resets. There's a lot of other stuff in the scripts that makes this happen so you can just ignore that. Here is the main script:

01function movezone ()
02    script.MoveZone.Disabled = false  --MoveZone is the script that makes the zone shrink.
03--The script is located inside the main script and it does make the zone shrink and stops moving the zone when the resetzone function occurs. I put the script at the very end.
04end
05 
06function resetzone () --This function is where I believe the error is.
07--Everything but the zone resetting appears to be working.
08 
09    script.MoveZone.Disabled = true
10    game.Workspace.Zone.Size = Vector3.new(2048, 1055.914, 2048)
11end
12 
13 
14 
15 
View all 64 lines...

Here is the script that makes the zone shrink. It is called MoveZone and starts out disabled. It is located inside the main script:

1while wait() do
2    wait(0.001)
3    game.Workspace.Zone.Size = game.Workspace.Zone.Size - Vector3.new(1,0,1)
4    end

Again, the problem is that the zone does not reset. If this matters at all the zone is a union part that is located in workspace. Can someone please help me fix this?

0
do you get any errors? you can check when play testing (press F9) NGC4637 602 — 3y

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago

Unions are unable to stretch, but MeshParts can. You should import your union to a MeshPart, and you can stretch it.

Heres a tutorial that might help, it's very simple: How to convert Union to a MeshPart?

0
Thankyou so much! epoke466 100 — 3y
Ad

Answer this question