(ENGLISH IS MY SECOND LANGUAGE, I MIGHT HAVE GRAMMAR PROBLEMS)
So, i just wanted to recreate sbeve from Slap Battles, so i made a cloning script. I tried using script.Parent:Clone(), the model is archivable.
-
What do you want to achieve? Keep it simple and clear! So i want to fix script.Parent:Clone() error.
-
What is the issue? Include screenshots / videos if possible! Issue is Workspace.Sbeve.Script:15: attempt to index nil with ‘Clone’ error
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Not really, just looked up at one page (Attempt to index nil with ‘clone’) and it all about one tool.
script.Parent.Torso.Touched:Connect(function(bas)
local par = bas.Parent
local hum = par:FindFirstChild("Humanoid")
if hum then
if par:FindFirstChild("Sbevee") == nil then
local plr = game.Players:GetPlayerFromCharacter(par)
print(plr)
if plr ~= nil then
game.SoundService.useful.cartoon_pop:Play()
for i, scr in pairs(script.Parent:GetChildren()) do
if scr:IsA("Script") then
script:Destroy()
end
end
local clone = script.Parent:Clone()
clone.Name = "Sbeve"
clone.Parent = workspace
plr.Character = clone
end
end
end
end)