So i was making a fireball script for cool stuff( using remote )
LocalScript:
local FireBall = game.Workspace.FireBall
local rp = game:GetService("ReplicatedStorage")
local FireBallRemote = rp.RemoteEvents.FireBall
local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local mousehit = player:GetMouse().Hit.p
UIS.InputBegan:Connect(function(input, IsTyping)
if IsTyping then
return
elseif input.KeyCode == Enum.KeyCode.E then
FireBallRemote:FireServer(player, mousehit)
end
end)
ServerScript:
local FireBall = game.Workspace.FireBall:Clone()
local rp = game:GetService("ReplicatedStorage")
local FireBallRemote = rp.RemoteEvents.FireBall
local UIS = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
FireBallRemote.OnServerEvent:Connect(function(player, mousehit)
local Character = player.Character
local HumanoidRootPart = Character.HumanoidRootPart
local Align = Instance.new("AlignPosition")
Align.Enabled = false
Align.Parent = HumanoidRootPart
Align.Attachment0 = HumanoidRootPart.RootRigAttachment
Align.Attachment1 = FireBall.FireBallAttachment
Align.RigidityEnabled = true
FireBall.Parent = Character
FireBall.CFrame = HumanoidRootPart.CFrame * CFrame.new(0,45,0)
------------tween2-------------------
local info1 = {}
info1.Size = FireBall.Size + Vector3.new(30,30,30)
local info12 = TweenInfo.new(7, Enum.EasingStyle.Quad)
local tween2 = TweenService:Create(FireBall,info12, info1)
-------------tween-------------
local info = {}
info.CFrame = mousehit --- the issue
local info6 = TweenInfo.new(7 ,Enum.EasingStyle.Quint )
local tween1 = TweenService:Create(FireBall, info6, info) -- the issue
tween2:Play()
Align.Enabled = true
wait(7)
tween2:Pause()
wait(1)
Align.Enabled = false
tween1:Play()
end)
As you can see there i was trying to set the CFrame value of the tween to the Mouse.p I checked and clicked "E" This is what the Output said D:,
Output:
** 18:08:26.645 - TweenService:Create property named 'CFrame' cannot be tweened due to type mismatch (property is a 'CoordinateFrame', but given type is 'Instance') 18:08:26.661 - Script 'ServerScriptService.FireBallHandle', Line 30**
what is that event suppose to mean, if you have any ideas how to set the fireball tween movement (CFrame) to the Cursor's aim or how to fix this , please tell me
(I've tried oCrxptic Solution but that reach's on the output to : ->Unable to cast to Dictionary <-

4 comments
Unable to cast to Dictionary -- oCrxptic
Why don't you just use the CFrame directly when making the Tween?
I am trying to aim the FireBall at the Cursor's aim, So i used ------ https://developer.roblox.com/en-us/api-reference/property/Mouse/Hit
Already used the CFrame directly by using the mouse.Hit.p