Union Part's Size Not Changing. Can Someone Help Me Fix This?
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:
02 | script.MoveZone.Disabled = false |
09 | script.MoveZone.Disabled = true |
10 | game.Workspace.Zone.Size = Vector 3. new( 2048 , 1055.914 , 2048 ) |
16 | function spawnplayers () |
17 | game.Workspace.Spawns.JoinGame.Parent = game.ServerStorage |
18 | game.ServerStorage.GameSpawn.Parent = game.Workspace.Spawns |
21 | for i, player in ipairs (game.Players:GetPlayers()) do |
22 | player.RespawnLocation = game.Workspace.Spawns.GameSpawn |
23 | if player.Character then |
24 | local hum = player.Character:FindFirstChild( 'Humanoid' ) |
31 | local information = Instance.new( "Message" ) |
32 | information.Text = "Run For Your Life, The Hounds Have Benn RELEASED!!!" |
33 | information.Parent = game.Workspace |
41 | game.Workspace.Spawns.GameSpawn.Parent = game.ServerStorage |
42 | game.ServerStorage.JoinGame.Parent = game.Workspace.Spawns |
47 | function resetplayers () |
48 | for i, player in ipairs (game.Players:GetPlayers()) do |
49 | if player.Character then |
50 | local hum = player.Character:FindFirstChild( 'Humanoid' ) |
63 | game.Workspace.Test.Touched:Connect(spawnplayers) |
64 | game.Workspace.TestUnspawn.Touched:Connect(resetplayers) |
Here is the script that makes the zone shrink. It is called MoveZone and starts out disabled. It is located inside the main script:
3 | game.Workspace.Zone.Size = game.Workspace.Zone.Size - Vector 3. new( 1 , 0 , 1 ) |
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?