Class GUI works in studio but not when played on ROBLOX player?
Asked by
7 years ago Edited 7 years ago
This script seems to be working on studio but does not work when I play the game through ROBLOX player, is there anything that needs to be changed? Thanks! (This is in a Local Script)
01 | player = script.Parent.Parent.Parent |
02 | backpack = player.Backpack |
04 | function chooseClass(class) |
05 | for i, v in pairs (backpack:GetChildren()) do v:remove() end |
06 | for i, v in pairs (class:GetChildren()) do |
08 | v:clone().Parent = backpack |
09 | elseif v:IsA( "HopperBin" ) then |
10 | v:clone().Parent = backpack |
16 | script.Parent.Frame.Visible = false |
17 | script.Parent.Cover.Visible = false |
18 | script.Parent.Title.Visible = false |
21 | function onHumanoidDied(humanoid, player) |
22 | script.Parent.Frame.Visible = true |
23 | script.Parent.Cover.Visible = true |
24 | script.Parent.Title.Visible = true |
27 | for i, v in pairs (script.Parent.Cover:GetChildren()) do |
28 | v.MouseButton 1 Up:connect( function () chooseClass(v) end ) |