KeeganwBLK
(KeeganwBLK)
August 31, 2021, 12:06am
#1
Hey developers,
I’ve tried making this a meshpart but it can’t combine the 2 mesh part textures and ends up looking weird.
It only shows the duck and not the duck’s hat with it.
What it should look like:
What it ends up looking like:
Code:
local Frame = script.Parent
local Duck = game.Workspace.Ducks:FindFirstChild(script.Parent.Parent.DuckName.Value):Clone()
Duck.Position = Vector3.new(0, 0, 0)
Duck.Orientation = Vector3.new(0, -180, 0)
Duck.Parent = Frame
local Camera = Instance.new("Camera")
Frame.CurrentCamera = Camera
Camera.Parent = Frame
Camera.CFrame = CFrame.new(Vector3.new(0, 0.70, 3.275), Duck.Position)
local count = -180
while wait() do
Duck.Orientation = Vector3.new(0, count, 0)
count += 2
if Duck.Orientation == Vector3.new(0, -180, 0) then
script.Parent.DestroyEvent:FireServer(tostring(game.Players.LocalPlayer.Name), tostring(script.Parent.Parent.Parent.Parent.Name))
end
end
Thank you! (I accidently went to the wrong topic and posted there, so thats why you see this again. I deleted the old post. )
1 Like
Abcreator
(Abcreator)
August 31, 2021, 12:28am
#2
Has the pirate hat got it’s archivable turned off?
KeeganwBLK
(KeeganwBLK)
August 31, 2021, 12:30am
#3
Nope. Should I turn that off??
Abcreator
(Abcreator)
August 31, 2021, 12:32am
#4
No, it should be kept on as that property (when off) stops the object from being cloned.
1 Like
Abcreator
(Abcreator)
August 31, 2021, 12:33am
#5
Okay found your problem:
KeeganwBLK:
Duck.Position = Vector3.new(0, 0, 0)
Duck.Orientation = Vector3.new(0, -180, 0)
You are setting to position and orientation of the duck and leaving the hat behind.
KeeganwBLK
(KeeganwBLK)
August 31, 2021, 12:34am
#6
I thought so, but I also thought that weld constraints would move with it, but it did not.
I also tried using a model instead of a part and nothing changed.
Abcreator
(Abcreator)
August 31, 2021, 12:35am
#7
WeldConstraints only work if the duck is placed in a WorldModel in the ViewPortFrame.
KeeganwBLK
(KeeganwBLK)
August 31, 2021, 12:36am
#8
Ohh, okay! I will test that out now! Thanks!
1 Like
Abcreator
(Abcreator)
August 31, 2021, 12:37am
#9
Just make sure the Duck is anchored in the WorldModel and the hat is not.
1 Like
KeeganwBLK
(KeeganwBLK)
August 31, 2021, 12:40am
#10
Hey, it works! Thank you. Now all I have to do is make the hat rotate with it.
1 Like
KeeganwBLK
(KeeganwBLK)
August 31, 2021, 10:48pm
#11
Hey so this works, but the hat is offset now and is behind the duck.
Do you know why this is happening?
Abcreator
(Abcreator)
September 1, 2021, 2:15am
#12
Try turning off CanCollide for the hat.
1 Like
KeeganwBLK
(KeeganwBLK)
September 5, 2021, 5:50pm
#13
Sorry for late response, nope. It doesn’t fix it.