|
| 14 Nov 2015 01:51 PM |
This doesn't fire when the text changes. Why?
CurrentGun.Changed:connect(function() if not CurrentGun.Text:find(".") then if LastCopy then LastCopy:Destroy() end local Selected = CurrentGun.Text:gsub("Current Gun: ", "") local Copy = GunsModel[Selected]:Clone() Copy.Parent = Background Copy.CFrame = Background.CFrame * CFrame.new(0, 2, 0) * Modules[Selected].Offset Copy.Variables:Destroy() LastCopy = Copy local Weld = Instance.new("Weld", Copy) Weld.Part0 = Background Weld.Part1 = Copy Weld.C1 = Copy.CFrame:inverse() end end) |
|
|
| Report Abuse |
|
|
| 14 Nov 2015 01:55 PM |
You realize that finding "." will match ANY character at all?
If you want to match a period, do %. instead. |
|
|
| Report Abuse |
|
|
| 14 Nov 2015 01:58 PM |
@Jarod
Thank you, that fixed it. |
|
|
| Report Abuse |
|