-
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.
-
What is the issue?
Not sure what to do
not looking for full scripts, just ideas. -
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.