Script not giving player the gear, no error? Please help
Asked by
4 years ago Edited 4 years ago
Im fairly new to scripting; messy code that i came up in my head because im too small brain to think of a simpler way
01 | game:GetService( 'Players' ).PlayerAdded:Connect( function (player) |
02 | player.CharacterAdded:Connect( function (character) |
03 | character:WaitForChild( "Humanoid" ).Died:Connect( function () |
04 | local Player = game.Players.LocalPlayer |
05 | local number = math.random( 1 , 4 ) |
09 | local gear = workspace.Folder.ClassicSword:Clone() |
11 | elseif number = = 2 then |
14 | local gear = workspace.Folder.RedHyperLaser:Clone() |
16 | elseif number = = 3 then |
19 | local gear = workspace.Folder.HyperlaserGun:Clone() |
21 | elseif number = = 4 then |
24 | local gear = workspace.Folder.Epicsword:Clone() |