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

Why does my tween say "Unable to cast to dictionary"?

Asked by 3 years ago

I need help fixing my tween error because when I do the Kamehameha, it just says "Unable to cast to dictionary" any solutions would help.

game.ReplicatedStorage.Moves.KamehamehaFolder.Kamehameha.OnServerEvent:Connect(function(plr)

local char = plr.Character
local debounce = false
local Kamehame = game.ReplicatedStorage.Moves.KamehamehaFolder.Ball:Clone()
local TweenService = game:GetService("TweenService")
local Kamehame2 = game.ReplicatedStorage.Moves.KamehamehaFolder.Ball2:Clone()
local Kamehameha = game.ReplicatedStorage.Moves.KamehamehaFolder.Beam:Clone()
local KamehamehaInside = game.ReplicatedStorage.Moves.KamehamehaFolder.BeamInside:Clone()
local Hold = Instance.new("Part")
local HoldInside = Instance.new("Part")
local RightHand = char["Right Arm"]
local BackPack = plr.Backpack
local Weld = Instance.new("WeldConstraint")
local Weld2 = Instance.new("WeldConstraint")
local KamehamehaFolder = game.ReplicatedStorage.Moves.KamehamehaFolder
local Anim = game.ReplicatedStorage.Moves.KamehamehaFolder.kamehamehaAnim
local Play = char.Humanoid:LoadAnimation(Anim)

char.Humanoid.WalkSpeed = 0
char.Humanoid.JumpPower = 0

wait(0.1)
Play.Priority = Enum.AnimationPriority.Action
Play:Play()

Hold.Material = Enum.Material.Neon
Hold.Transparency = 0.35
Hold.CanCollide = false
Hold.Shape = "Ball"
Hold.Color = Color3.new(0.333333, 0, 1)
Hold.Parent = char
Hold.Position = RightHand.Position + Vector3.new(0,-1.2,0)
Hold.Size = Vector3.new(2,2,2)
Weld.Parent = Hold
Weld.Part0 = Hold
Weld.Part1 = RightHand

HoldInside.Material = Enum.Material.Neon
HoldInside.CanCollide = false
HoldInside.Shape = "Ball"
HoldInside.Color = Color3.new(1, 1, 1)
HoldInside.Parent = Hold
HoldInside.Position = RightHand.Position + Vector3.new(0,-1.2,0)
HoldInside.Size = Vector3.new(1.5,1.5,1.5)
Weld2.Parent = HoldInside
Weld2.Part0 = HoldInside
Weld2.Part1 = Hold

wait(2)
Hold.Transparency = 1
HoldInside.Transparency = 1

Kamehame.Parent = char
Kamehame.Orientation = Kamehame.Orientation + Vector3.new( 0, 90, 0)
Kamehame.CFrame = char.HumanoidRootPart.CFrame * CFrame.new( 0 ,0, -5)
Kamehame2.Parent = char
Kamehame2.Orientation = Kamehame.Orientation + Vector3.new( 0, 90, 0)
Kamehame2.CFrame = char.HumanoidRootPart.CFrame * CFrame.new( 0, 0, -5)

Kamehameha.Parent = char
Kamehameha.CFrame = Kamehame.CFrame * CFrame.new( 0, 0, -3.75)
Kamehameha.Orientation = Kamehameha.Orientation + Vector3.new( 0, 90, 0)
KamehamehaInside.Parent = char
KamehamehaInside.CFrame = Kamehame.CFrame * CFrame.new(0,0,-3.75)
KamehamehaInside.Orientation = KamehamehaInside.Orientation + Vector3.new(0,90,0)
wait(0.5)
local info = TweenInfo.new(4,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,1,false,0)
local goal = {Size = Kamehameha.Size + Vector3.new(0,0,100)}
local tween = TweenService:Create(info,goal,Kamehameha)

wait(3)
debounce = false
char.Humanoid.WalkSpeed = 16
char.Humanoid.JumpPower = 50
Hold:Destroy()
HoldInside:Destroy()

wait(1)

Kamehame:Destroy()
Kamehameha:Destroy()
KamehamehaInside:Destroy()

end)

1 answer

Log in to vote
0
Answered by 3 years ago
local tween = TweenService:Create(Kamehameha, info, goal)
Ad

Answer this question