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

Having script troubles?

Asked by 10 years ago
while true do
    wait(15)
    game.Lighting.Turkey:Clone().Parent = game.player.Backpack
    wait(30)
    game.Lighting.Turkey:Clone().Parent = game.player.Backpack
    wait(12)
    game.Lighting.Turkey:Clone().Parent = game.player.Backpack
end

It won't work in game so I'm sure I did something wrong. Is there a line of code I put after "end"? I see it in a lot of loop scripts.

0
This script is in a tool. Also, could you please verify if I put it in the Handle, or just the tool. (It's using the Fluffy Unicorn scripts.) Disorbed 0 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

You didn't define player.

Put this above while true do.

local player = game.Players.LocalPlayer

By the way, switch it to local script

0
It didn't seem to work.... It's for a Fluffy Unicorn tool with a Trollamon mesh on it if that helps.... Disorbed 0 — 10y
0
Oh, I'm sorry. Roboy5857 20 — 10y
Ad
Log in to vote
0
Answered by
Ekkoh 635 Moderation Voter
10 years ago

If you're in Play Solo, try setting the parent like this

game.Lighting.Turkey:Clone().Parent = Game.Players.Player.Backpack

or if you're actually in a Roblox Server

game.Lighting.Turkey:Clone().Parent = Game.Players.iDarrick.Backpack

Answer this question