Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Lucky Block Script not working? Please help i dont know whats wrong ddddddddddddd?

Asked by
TNTIsLyfe 152
5 years ago

I made this lucky block script for my lucky block so it does a random thing but nothing works at all can u tell me what did i do wrong? Script:

001script.Parent.Activated:Connect(function(player)
002script.Parent:Destroy()
003local Roar = math.random(1,30)
004if Roar == 1 or 2 or 3 or 4 or 5 then
005player.Character.Humanoid.MaxHealth = 1000
006elseif Roar == 6 or 7 or 8 or 9 or 10 then
007game.ServerStorage.Nothing:Clone().Parent = player.PlayerGui wait (2)
008player.PlayerGui.Nothing:Destroy()
009elseif Roar == 11 or 12 or 13 or 14 or 15 then
010player.Character.Humanoid.Health = 0
011elseif Roar == 16 then
012game.ServerStorage["LUCKY SWORD :O"]:Clone().Parent = player.BackPack
013elseif Roar == 17 or 18 or 19 or 20 then
014game.ServerStorage.Blame.TextLabel = "Blame"..player.Name.."for this"
015for _, v in pairs(game.Players:GetChildren()) do
View all 182 lines...

I would thank you if u helpoed me

0
my eyes are popping HappyTimIsHim 652 — 5y
0
Don't use Lighting, it is easily exploitable. Geobloxia 251 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Put the tools that you want the players to get in ReplicatedStorage

Also what would be helpful is to print the random number you got. fx.

1print(Roar)

Also if it is in a normal script then you get the character like this:

1local char = game.Workspace:FindFirstChild(player.name)

and use a wait function too.

Very simple mistakes :D

0
i did put the tools in serverstorage Why replicatedstorage? TNTIsLyfe 152 — 5y
0
Huh im putting print but its not printing the number for some reason TNTIsLyfe 152 — 5y
0
Oh also there is a error with the giving scripts something about local player and random backpacks and stuff TNTIsLyfe 152 — 5y
0
Maybe make it wait maxpax2009 340 — 5y
View all comments (9 more)
0
ReplicatedStorage is designed for cloning items as in its name. ServerStorage is okay, but sometimes doesn't work. Don't use Lighting though, it is easily exploitable. Geobloxia 251 — 5y
0
its not the item problem its the player.backpack problem it shows a error with that TNTIsLyfe 152 — 5y
0
there is this error in the giving thing about the character = nil and print still doesnt show even with wait TNTIsLyfe 152 — 5y
0
hm ok i managed to fix the print problem but i dont understand why the features dont work TNTIsLyfe 152 — 5y
0
Is it in a local script? maxpax2009 340 — 5y
0
:/ that is a stupid question :/// TNTIsLyfe 152 — 5y
0
uh max i dont need the character :/ TNTIsLyfe 152 — 5y
0
Uh yeah, if you are setting the tool's parent is equal to the player then you also need the character. maxpax2009 340 — 5y
0
ok but why doesnt other stuff work atleast TNTIsLyfe 152 — 5y
Ad

Answer this question