You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I want when I press E aiming for the part it floats like telekinesis power -
What is the issue?
Unable to cast to Dictionary error
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried seeing youtube tutorials and anothers posts on devforum but didnt find any post similar to my problem
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local UIS = game:GetService("UserInputService")
local TweenA = game:GetService("TweenService")
local euhd = mouse.Target
UIS.InputBegan:Connect(function(input, gpe)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.E and mouse.Target:IsA("BasePart") and mouse.Target.Name ~= "Baseplate" then
local brhu = mouse.Target
local goal = {
Vector3.new(brhu.Position.X,euhd.Position.Y+8, euhd.Position.Z)}
local info = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false
)
local yee = TweenA:Create(brhu, info, goal)
yee:Play()
end
end
end)
Thanks