I am currently trying to make a script to move a part to where the mouse is pointing, when I run the script it returns an error saying "Unable to cast to Dictionary" and I have no clue how to fix this.
game.ReplicatedStorage.Events.SpellFired.OnServerEvent:Connect(function(plr,spell,pos)
local SpellPart = game.ReplicatedStorage.Spells.FireBall
local copy = SpellPart:Clone()
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,1,false,0)
copy.Parent = workspace
game.Workspace.FireBall.Position = workspace[plr.Name].HumanoidRootPart.Position
local tween = TweenService:Create(copy, tweenInfo, pos)
wait(6)
copy:Destroy()
end)
The "pos" variable is a Vector3

1 comment
Thank you so much!