#help
38 messages · Page 1 of 1 (latest)
can u show the script
it's only in the character when it is equipped
before it's equipped it is in Player.Backpack
yeah
ok wait
lemme explaina lil more
when i load into the game there nothing
but
when i press e
its imeediated transported to the players hand
which one
the sword equiping script
or the script finding the sword
both
ok
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local sword = game.ReplicatedStorage:WaitForChild("Sword") -- Your sword model
local hand = character:WaitForChild("RightHand")
-- Function to attach the sword
local function attachSword()
local clonedSword = sword:Clone()
clonedSword.Parent = character
-- Set PrimaryPart
local handle = clonedSword:FindFirstChild("Handle") -- Replace with your handle's name
if handle then
clonedSword.PrimaryPart = handle -- Set the PrimaryPart to the handle
-- Create a normal weld
local weld = Instance.new("Weld")
weld.Part0 = handle
weld.Part1 = hand
weld.Parent = handle
clonedSword:SetPrimaryPartCFrame(hand.CFrame * CFrame.new(0, -1, 0) * CFrame.Angles(0, math.rad(90), 0)) -- Adjusting rotation
else
warn("Sword does not have a 'Handle' part.")
end
end
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
attachSword()
end
end)
** You are now Level 7! **
erm
the whole animation script is inside of the script for the e keybind
like if e isnt pressed then the animation wont play
wait is this normal script or local
local
are u using userinputservice to play the animation too?
space key
yeah
im not sure why its not working then
this is not sigma 😔
welp ill just stop for today then
thanks'
!!!
am i supposed to jsut close it or do something else when i wanna remove the post?
prety sure u can just leave it