(SOLVED) Im trying to make a script using "if" in StringValue but doesn't work, what is wrong?
Asked by
7 years ago Edited 7 years ago
i cant find the error, im trying to make when click in the gui if StringValue is GomuGomuNoMi clone the gui in lighting and put in starterGui.hotbar.SkillBar1 and if there are something in skill bar 1 that dont is called SkillOff or SkillOffPermanently he will put the gui in skill bar 2, and the same thing in 2, 3 and 4, but i cant find the error
2 | if script.Parent.Parent.Parent.Parent.stats.AkumaNoMi.Value = GomuGomuNoMi then |
3 | game.Lighting.GomuGomuNoPistol:clone() = script.Parent.Parent.SkillBar 1 |
7 | script.Parent.MouseButton 1 Down:connect(Click) |
what is wrong?
(SOLVED)
i re-created the script, and now it works, look
01 | Plr = game.Players.LocalPlayer |
03 | script.Parent.MouseButton 1 Down:connect( function () |
04 | for _,v in pairs (Plr.PlayerGui:GetChildren()) do |
05 | if v.Name = = script.Parent.Name then |
09 | if game.Players.LocalPlayer.stats.AkumaNoMi.Value = = "GomuGomuNoMi" then |
10 | Tool = game.Lighting.GomuGomuNoPistol:Clone() |
11 | Tool.Parent = Plr.PlayerGui.Hotbar.SkillBar 1 |