Hello i am straight up confused with this. the thing is that i'm trying to tween a nuke using tweenservice and i was creating the final part of the code. and then i got this error Unable to cast to Dictionary. I Know What This Means. And The Error But I Tryed Fixing Things Around Even Looking On The Roblox Developer Hub. And Im Doing The Same As How Lua Wants It Buts it still not working. please help me im confused and have no idea what to do. Anway Heres The Details Of The Script Error: Line 27 Is A Script, Inside Of Workspace
Leave Any Suggestions Answers Below
-- setting up variables
local PARENT_OFNUKE = script.Parent
local REMOTE = workspace.AdminWorkspace.Nuke
local TWEEN_SERVICE = game:GetService("TweenService")
local NORMAL_POS = Vector3.new(-89.16, 663.774, 40.974)
-- setting up tweens
local TWEEN_INFO_POS = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false
)
local TWEEN_INFO_SIZE = TweenInfo.new(
4,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false
)
local GoalsForSize ={
Size = Vector3.new(444, 61, 410)
}
local TARGET = {CFrame.new == CFrame.new(-89.16, 663.774, 40.974)}
local MOVEIN = TWEEN_SERVICE:Create(PARENT_OFNUKE,TWEEN_INFO_POS,TARGET)
-- Main COde
REMOTE.OnServerEvent:Connect(function()
script.Parent.Transparency = 0
warn("GotEvent")
-- Sets The Parent To Workspace.
PARENT_OFNUKE = workspace
wait(1)
-- Plays The Animation
MOVEIN:Play()
wait(2)
-- Setting Up The Part. And Tween
local EXPLOSION_SPHERE = Instance.new("Part")
local MAKESIZE = TWEEN_SERVICE:Create(EXPLOSION_SPHERE,TWEEN_INFO_SIZE,GoalsForSize)
EXPLOSION_SPHERE.Shape = "Cylinder"
EXPLOSION_SPHERE.Orientation = Vector3.new(0, 0, 90)
EXPLOSION_SPHERE.Position = Vector3.new(game.Workspace.NukePos.Position)
EXPLOSION_SPHERE.Anchored = true
EXPLOSION_SPHERE.CanCollide = false
-- Requires A Kill Script And Sets Is Parent To EXPLOSION_SPHERE
script.Parent.KO.Parent = EXPLOSION_SPHERE
-- Sets The Parent to MAIN_PARENT and Starts The Tweeout
script.Parent.Position = Vector3.new(-89.16, 663.774, 40.974)
script.Parent.Transparency = 1
MAKESIZE:Play()
wait(2)
end)
