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

Error While Respawning Tool?

Asked by 5 years ago

Greetings, I am currently scripting a script in when a part is touched, a tool respawns. After the tool is spawned, it should move to a specific area in the map. However, I get this error: http://prntscr.com/lz0rrp

script.Parent.Touched:connect(function()
    local model = game.ReplicatedStorage.Football:Clone()
    model.Parent = game.Workspace
    local handle = model:WaitForChild("Handle")
    handle.CFrame = CFrame.new(99, 4.9, 9.3)
end)

Can someone help me with my code please?

0
i dont see anything wrong with your code, other than the fact that `:connect()` is deprecated and should be `:Connect()`. thats just a warning, and it says the parent is still workspace, so i dont really see the issue. additionally, if you have any welds in this tool, they will be broken by line 5 Gey4Jesus69 2705 — 5y
0
I got the same error before too, i think it happens when you try to change the parent of something too fast after it's parent just got changed GoldAngelInDisguise 297 — 5y
0
Maybe your character stood where the tool spawned so when the tool was added to workspace it instantly parented to the player, just a guess, i have a feeling that isnt the problem GoldAngelInDisguise 297 — 5y

Answer this question