so im new to scripting and i have problem with the teleport effect.
v This Is What I Want To Do v
what wrong in my script?
local script(in StarterPlayerScripts)
wait()
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
Mouse.KeyDown:Connect(function(key)
if key == "z" then --Change K to any keyboard button
Player.Character:MoveTo(Mouse.Hit.p)
local RS = game:GetService("ReplicatedStorage")
local part = RS.Whirl
local Character = Player.Character
local humrp = Character.Humanoid.HumanoidRootPart
local effect = part:Clone()
effect.Parent = Character
effect.CFrame = humrp.CFrame
wait()
effect.Transparency = 0.5
wait()
effect.size = Vector3.new(14.441, 7.408, 7.408)
wait()
effect.size = Vector3.new(10.236, 6.384, 6.384)
wait()
effect.Transparency = 1
effect:Destroy()
end
end)
also i have an error when i teleport:
HumanoidRootPart is not a valid member of Humanoid “Workspace.sagiv200421.Humanoid”