So im trying to put the players character in a ball so the character and ball roll around. But for some reason 2 balls get cloned and the actual ball doesnt want to roll
local go = false
script.Parent.Touched:connect(function(hit)
if go == false then
go = true
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.PlayerScripts.ControlScript.Disabled = true
local clone = workspace.Marble:Clone()
clone.Parent = hit.Parent.Torso
clone.CFrame = workspace.MarbleSpawn.CFrame
clone.Anchored = false
local weld = Instance.new("Weld")
weld.Parent = clone
weld.Part0 = clone
weld.Part1 = hit.Parent.Torso
hit.Parent.Torso.CFrame = clone.CFrame
game.Lighting.Marble:FireClient(player)
go = false
end
end
end)
game.Lighting.Marble.OnClientEvent:connect(function()
game.Players.LocalPlayer.Character.Humanoid:SetStateEnabled("GettingUp",false)
game.Players.LocalPlayer.Character.Humanoid:SetStateEnabled("PlatformStanding",true)
game.Players.LocalPlayer.Character.Torso:WaitForChild("Marble").Rotation = Vector3.new(0,160,0)
wait(1)
game.Players.LocalPlayer.Character.Torso:WaitForChild("Marble").Rotation = Vector3.new(0,200,0)
end)
