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

Im making a ice script for my friend and this one piece of code isnt working i really need help?

Asked by 5 years ago

This is the part of the script thats really not working roblox studio just shows line 44 + line 101 line 44 is the "local function Ice()" and line 101 is all the way at the bottom where it says "for o = 1,50 do Ice() wait()"

local function Ice()
    local extra = math.random(-1.1,1.1)
    local Shard = game.ReplicatedStorage.IceShard:clone()
    local side = math.random(-sideval,sideval)
    up = Shard.Size.Y/2
    local rotate = math.random(0,180)
    local MRo = math.Random(99,100)
    if MRo == 99 then
    SRo = math.random(8/10)/10
    URo = MRo + SRo
    else
    SRo = math.random(1,3)/10
    URo = MRo + SRo
    end
    local lean = math.random(4,4)/10
    Shard.Size = Vector3.new(sizez,sizex,sizez)
    Shard.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(side,-up,val + extra)
    Shard.Parent = folder
    Shard.CFrame = Shard.CFrame * CFrame.from.EulerAnglesXYZ(URo,rotate,0.4)
    ~~~~~~~~~~~~~~~~~

This part really struggles me i really dont know why..  


    val = val - 2
    sizez = sizez + 1
    sizex = sizex + 1
    sideval = sideval + .5
    game.Debris:AddItem(Shard,3)


    local TweenService = game:GetService("TweenService")



    local TweenInform = TweenInfo.new(
        .2,
        Enum.EasingStyle.Linear,
        Enum.EasingDirection.Out,
        0,
        false,
        0.

    )



    local properties = {
        CFrame = Shard.Cframe * CFrame.new(0,up*1.5,0)

    }


    local Tween = TweenService:Create(Shard,TweenInform,properties)
    local Dmg = script.Dmg:clone()
    Dmg.Parent = Shard




end




for o = 1,50 do
    Ice()
    wait()
end 


end)

0
In line 42, you have a "." after the 0. I don't know if that is your problem, but you could try removing it Creeperman1524 120 — 5y
0
https://gyazo.com/d4c4fc7d27f5a8f931ea0f809bdcd828 nah thats not the reason its just these lines AiphaSerenity -5 — 5y

Answer this question