Output makes no sense?
04 | if enabled = = true then |
06 | shell = game.ReplicatedStorage.Shell:Clone() |
07 | shell.Parent = script.Parent.Parent |
08 | shell.CFrame = script.Parent.Parent.Spawn 1. CFrame |
09 | shell 2 = shell:Clone() |
10 | shell 2. Parent = script.Parent.Parent |
11 | shell 2. CFrame = script.Parent.Parent.Spawn 2. CFrame |
13 | shell 3 = shell 2 :Clone() |
14 | shell 3. Parent = script.Parent.Parent |
15 | shell 3. CFrame = script.Parent.Parent.Spawn 1. CFrame |
16 | shell 4 = shell 3 :Clone() |
17 | shell 4. Parent = script.Parent.Parent |
18 | shell 4. CFrame = script.Parent.Parent.Spawn 2. CFrame |
21 | if shell.Value.Value = = 25 then |
24 | elseif shell.Value.Value = = 0 then |
29 | if shell 2. Value.Value = = 25 then |
32 | elseif shell 2. Value.Value = = 0 then |
38 | if shell 3. Value.Value = = 25 then |
41 | elseif shell 3. Value.Value = = 0 then |
46 | if shell 4. Value.Value = = 25 then |
49 | elseif shell 4. Value.Value = = 0 then |
57 | script.Parent.Touched:connect(onTouch) |
This script causes shells to roll down a hill and disappear after a set time. If a shell hits someone, the script will wait for the shell's script to execute before destroying it. The shell itself gradually decreases the player's health by 25, and the IntValue (named Value) in the shells keep track of when the player's health is successfully drained. The Value should hit 25, signalling the script that the script is done and that it's okay to destroy the shell. However, when the script is triggered, this shows up in the output:
What?! I checked the clones that the script spawns, and they do indeed have Values in them. Is the problem cause by the fact that the shells are unions? What's going on? The shells are named Shell, not UnionOperation.