Stand Location?

  1. What do you want to achieve?
    I’m currently tryna make a JoJo’s bizarre adventure game, it’s really easy and helping me learn LUA a lot! I’m trying to keep the “stand” beside the user whenever you press Q, but I don’t exactly know how to do this.
    image

  2. What is the issue?
    Not sure what to do
    not looking for full scripts, just ideas.

  3. What solutions have you tried so far?

--Setup script
Stand = script.Stand:Clone()

Stand.HumanoidRootPart.Position = script.Parent:WaitForChild("HumanoidRootPart").Position

Stand.Parent = script.Parent


Weld = Instance.new("Weld")
Weld.Parent = Stand.HumanoidRootPart
Weld.Part0 = Stand.HumanoidRootPart
Weld.Part1 = script.Parent:WaitForChild('HumanoidRootPart')

Stand.Head.Transparency = 1
Stand.Torso.Trans-.......
--has too many children dont wanna put all of them here lol
--Local script
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
DB = false

Mouse.KeyDown:Connect(function(key)
	if key == "q" then	
		if Player.Character.HumanoidRootPart.CanAttackRN.Value == true then
			if DB == false then
				if script.Parent:FindFirstChild("Pose").Pose.Value == false then
					DB = true
					game.ReplicatedStorage.Folder.TheWorld1.Summon:FireServer()
					wait(0.8)
					DB = false
				end
			end
		end
	end
end)
-- Summon Script
function Summon(player)
	local Stand = script.Parent:FindFirstChild("Stand")
	Stand.HumanoidRootPart.CFrame = script.Parent:FindFirstChild("HumanoidRootPart").CFrame + Vector3.new(0, 5, 0)
end

game.ReplicatedStorage.Folder.TheWorld1.Summon.OnServerEvent:Connect(Summon)

I didn’t put too much effort into the summon script since I’m kinda lost on what to do.

easy.

stand.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,0,0)

you can edit 0,0,0 to be your numbers to offset

also, to be more efficient you could loop through the children of the stand and then change transparency.

1 Like

Sorry for the extremely late reply, forgot to check devforum until today, do you know where I should put the code? should I put it before the weld, because all it does is teleport me up. Also the Summon script is server sided

NVM! I just changed Weld to weldconstrant, thanks for the help!