Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Problem with a sphere welded to the character?

Asked by 6 years ago

I have a character spawning inside a sphere. When I turn CanCollide to false the character's legs keep going through the baseplate and then coming back up, like it's bouncing. The problem goes away when CanCollide is on or when the sphere is smaller than the character. Here's the code:

local forcefield = Instance.new("Part", Character)
forcefield.Name = "Forcefield"
forcefield.Shape = "Ball"
forcefield.Size = Vector3.new(8,8,8)
forcefield.CanCollide = false
forcefield.BrickColor = BrickColor.new("Teal")
forcefield.Transparency = 0.25
forcefield.TopSurface = Enum.SurfaceType.Smooth
forcefield.BottomSurface = Enum.SurfaceType.Smooth
local Weld = Instance.new("Weld", forcefield)
Weld.Part0 = Character.Torso
Weld.Part1 = forcefield
Weld.C1 = CFrame.new(0,0,0)

Is this a bug or am I doing something wrong?

1 answer

Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago

don't use Instance.new("Part", Character) its depecrated

Also since you used "Torso" it will only work in R6.

and I think this is incorrect Weld.C1 = CFrame.new(0,0,0)

Ad

Answer this question