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

why is part not tweening or not spawning in at all?

Asked by
tacotown2 119
5 years ago
Edited 5 years ago
local remote = game.ReplicatedStorage.Yami
remote.OnServerEvent:Connect(function(plr,Mouse,db)
    local TweenService = game:GetService("TweenService")
    local char = plr.Character or plr.CharacterAdded:Wait()
    local dmg = false
    local Enabled = true
    db = true
    wait(1)
    local void = Instance.new("Part")
    void.Shape = "Cylinder"
    void.Transparency = 0
    void.Anchored = true
    void.Size = Vector3.new(3, 33.47, 6.34)
    void.CanCollide = false
    void.CFrame = plr.Character["Left Leg"].CFrame*CFrame.new(0,-1,0) * CFrame.Angles(0, 0, 80.1)
    void.BrickColor = BrickColor.new("Really black")
    void.Material = "Metal"
    void.Name = "Voidd"
    void.Parent = char
local tweenInfo = TweenInfo.new(
    2, -- Time
    Enum.EasingStyle.Linear, 
    Enum.EasingDirection.Out, 
    9999,
    true, 
    10 
)

local tween = TweenService:Create(void, tweenInfo, {Size = Vector3.new(0, 0, 50)})

tween:Play()


    dmg = false
void.Touched:Connect(function(hit)
            local hum = hit.Parent:FindFirstChild("Humanoid")
            if hit.Parent:FindFirstChild("Humanoid")== nil then return end
            if dmg  and hum.Parent == char then
                hum:TakeDamage(0)
            else 
                dmg = true
                    hit.Parent.Humanoid:TakeDamage(script.Dmg.Value)
                    if hit.Parent:FindFirstChild("Torso") then
                        hit.Parent:FindFirstChild("Torso").Anchored = true
                        wait(0.2)
hit.Parent:FindFirstChild("Torso").Anchored = true
wait(1)
hit.Parent:FindFirstChild("Torso").Anchored = true
wait(1)
hit.Parent:FindFirstChild("Torso").Anchored = true
wait(1)
hit.Parent:FindFirstChild("Torso").Anchored = false
                    end
                    if hit.Parent:FindFirstChild("UpperTorso") then
                        hit.Parent:FindFirstChild("UpperTorso").Anchored = true
                        wait(0.2)
hit.Parent:FindFirstChild("UpperTorso").Anchored = true
wait(1)
hit.Parent:FindFirstChild("UpperTorso").Anchored = true
wait(1)
hit.Parent:FindFirstChild("UpperTorso").Anchored = true
wait(1)
hit.Parent:FindFirstChild("UpperTorso").Anchored = false
                    end
                    wait(1)
           end
end)
wait(15)
tween:Stop()
    void:Destroy()
    db = false
end)

it diddnt work when i add tweening so i think its bcw my tween not working???

0
From what I can see, you forgot to change the transparency back from 0. Knineteen19 307 — 5y
0
Oh wait, I'm big dumb, 0 means visible. Is the parent of the part set to game.Workspace? Knineteen19 307 — 5y
0
no its set in char tacotown2 119 — 5y

Answer this question