How would I make something like this?

Not sure where to ask this, but I was wondering how this was made. I’m assuming they used a ViewportFrame, but I’m not very experienced with them. Can anyone help?

https://gyazo.com/652e9a6f7db6e629035e5398a7eaa830

You would have to use viewport frames and a rotation script. This may help.

1 Like

Should I keep the sword handles in ReplicatedStorage and just copy it instead of instancing a new one

You should just clone the swords from replicatedstorage.

1 Like

Ok, I have the sword in the frame but I’m not sure how to rotate it.

Rotate the model like you would any other

Should I use a tween to rotate it?

Whatever fits for your use case, there’s no right or wrong way to do it. Whatever you think looks nicest, basically.

You will need a camera for the sword to appear. But here is the tween if you need it.

local sword = script.Parent
local ts = game:GetService("TweenService")

local info = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
0
)
local rand = math.random(-360,360)
local ending = {Orientation = Vector3.new(rand, rand, rand)}
local tween = ts:Create(sword, info, ending)
local gui = game.StarterGui.Gui -- define the gui for the sword

local h = false
gui.MouseEnter:Connect(function(player)
h = true
end)

gui.MouseLeave:Connect(function(player)
h = false
end)
while h == true do
   tween:Play()
   wait(1)
end

Hmm. I tried that tween and mine came out like this: https://gyazo.com/fa0fcd3ae9340b0c990bee3da1c6970d

Change the time in the TweenInfo to something bigger.

I wanna avoid using random so every viewportframe is moving the handle in the same way

You would want to use a viewport frame for that.