My weapon suddenly disappears

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the weapon to stay there

  2. What is the issue? Include screenshots / videos if possible!
    My weapon just suddenly disappears

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried using different welds, and one thing I found out is that if I anchor the weapon, the weapon will not disappear, note that only the weapon parts disappear, the string value inside the weapon model stays there
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

The weapon
image

Code

repeat wait() until script.Parent.Parent == game.workspace

local char = script.Parent
local hammer = char.Hammer
local main = hammer.Main
local handle = hammer.Handle

hammer.Handle.CFrame = char.RightHand.CFrame

local weld = Instance.new("WeldConstraint")
weld.Parent = char.RightHand
weld.Part0 = char.RightHand
weld.Part1 = hammer.Handle

local weld2 = Instance.new("WeldConstraint")
weld2.Parent = hammer.Handle
weld2.Part0 = hammer.Handle
weld2.Part1 = hammer.Main

while wait() do
	hammer.Parent = char
	print(main.Parent)
	print(handle.Parent)
end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Solved I didn’t put the weld script inside server script, instead I put it in local script, so the weapon fell into the void when I play the game. It is fixed after I put it in the server side script

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.