If the two parts are welded, they move together. I never said they become one part, it just seems like it. Since the Main part of this system would be the one doing collision detections, and the one that has forces acting on it, the forcefield would just be a decoration that is welded on the main part.
But that STILL does not fix the problem of his script not working. He said that the script isnt working because he is using 2 parts instead of 1.
So either that im wrong and that he does not know how to properly describe the problem, or that you are wrong. Eitherway i apologize for what i said earlier.
Could we see the script that you’re working on at the moment?
Yeah alright…Oh and i managed to fix it.
EDIT: I think…
local player = game.Players.LocalPlayer
local char = workspace:WaitForChild(player.Name)
local tool = script.Parent
local humanoid = char.Humanoid
local throw = Instance.new("Animation")
throw.AnimationId = ("rbxassetid://6655555775") -- put your animation here
local throwAnim = humanoid:LoadAnimation(throw)
local mouse = player:GetMouse()
local debounce = false
tool.Activated:Connect(function()
if not debounce then
debounce = true
throwAnim:Play()
wait(0.3)
local telepearl = game.ReplicatedStorage.Telepearl:Clone()
telepearl.Parent = workspace
telepearl.CFrame = tool.Handle.CFrame * CFrame.new(0,0,-1)
telepearl.CFrame = CFrame.new(tool.Handle.Position, mouse.Hit.p)
local Force = Instance.new("BodyForce")
Force.Parent = telepearl
Force.Force = Vector3.new(0, workspace.Gravity * telepearl:GetMass() - 2, 0)
telepearl.Velocity = CFrame.new(tool.Handle.Position, mouse.Hit.p).lookVector * 120
wait(0.1)
telepearl.Touched:Connect(function()
local db = false
if not db then
db = true
print("touched")
telepearl.Anchored = true
char.HumanoidRootPart.CFrame = telepearl.CFrame + Vector3.new(0,5,0)
telepearl:Destroy()
end
end)
debounce = false
end
end)
What was the issue in your code?
I think it doesn’t have any issues at all…I think it’s all my actions in the part that broke it.
That’s the video i recorded of it working.
Please press F9 and show the output of your script.
You didn’t use the tool, so the output isn’t showing. Please start a simulation, click with the tool out, and show your output.
Ah yes, the animation blending update on roblox. Really wish I could disable it.
I need you to do a little bit of reworking.
Please rename your Char
variable to character
. Set the character variable to player.Character
. Replace any mentions of Char
to character
. Once you’ve done that, please show me your code and the output.
local player = game.Players.LocalPlayer
local character = player.Character
local tool = script.Parent
local humanoid = character.Humanoid
local throw = Instance.new("Animation")
throw.AnimationId = ("rbxassetid://6655555775") -- put your animation here
local throwAnim = humanoid:LoadAnimation(throw)
local mouse = player:GetMouse()
local debounce = false
tool.Activated:Connect(function()
if not debounce then
debounce = true
throwAnim:Play()
wait(0.3)
local telepearl = game.ReplicatedStorage.Telepearl:Clone()
telepearl.Parent = workspace
telepearl.CFrame = tool.Handle.CFrame * CFrame.new(0,0,-1)
telepearl.CFrame = CFrame.new(tool.Handle.Position, mouse.Hit.p)
local Force = Instance.new("BodyForce")
Force.Parent = telepearl
Force.Force = Vector3.new(0, workspace.Gravity * telepearl:GetMass() - 2, 0)
telepearl.Velocity = CFrame.new(tool.Handle.Position, mouse.Hit.p).lookVector * 120
wait(0.1)
telepearl.Touched:Connect(function()
local db = false
if not db then
db = true
telepearl.Anchored = true
character.HumanoidRootPart.CFrame = telepearl.CFrame + Vector3.new(0,5,0)
telepearl:Destroy()
end
end)
debounce = false
end
end)
What exactly is occurring? Are you teleporting at all? Is nothing happening? Can you see the pearl?
Everything functions well as you can see in the video I sent earlier. But one thing I really hate is if I teleport to other places. It has like a fling effect…? We’re you accidentally fall and bump your head…That doesn’t usually happens in bedwars.
You can change your .HumanoidRootPart.CFrame
to a :MoveTo()
method. You’ll have to calculate the offset beforehand, but read up about it here.
You can also try anchoring the character before teleporting and then unanchoring them afterwards.