You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to change a part’s orientation that I call from replicated storage by press “J” -
What is the issue? Include screenshots / videos if possible!
https://gyazo.com/a359a8a7dd6dfbf68caf322c3c6037dd
I want it to be horizontal like this
https://gyazo.com/28befb1693d9a9f2d2b95b036e0fce1a -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Youtube and many forums.
This is the script where I have the properties of my part
local meshes = game.ServerStorage.Elements:WaitForChild("Fire Element")
local move = meshes:WaitForChild("FireVortex")
local ra1 = move:WaitForChild("Red Aura 1")
local ra2 = move:WaitForChild("Red Aura 2")
local vortex = move:WaitForChild("Vortex")
local ya1 = move:WaitForChild("Yellow Aura 1")
local ya2 = move:WaitForChild("Yellow Aura 2")
debounce = false
canTouch = false
vortex.CFrame = vortex.CFrame * CFrame.Angles(0,math.rad(90),0)
game.ReplicatedStorage.FireVortex.OnServerEvent:Connect(function(player, direction)
local character = player.Character
local getchar = character:GetChildren()
local humanoid = character:WaitForChild("Humanoid")
local humrp = character:WaitForChild("HumanoidRootPart")
local newRa1 = ra1:Clone()
local newRa2 = ra2:Clone()
local newVortex = vortex:Clone()
local newYa1 = ya1:Clone()
local newYa2 = ya2:Clone()
local weld1 = Instance.new("Weld", newRa1)
local weld2 = Instance.new("Weld", newRa2)
local weld3 = Instance.new("Weld", newVortex)
local weld4 = Instance.new("Weld", newYa1)
local weld5 = Instance.new("Weld", newYa2)
for i, v in pairs(getchar) do
if v:IsA("Part") then
--character.HumanoidRootPart.Transparency = 1
v.Transparency = 1
end
if v:IsA("Accessory") then
v.Handle.Transparency = 1
end
end
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = direction.lookVector * 50
BV.Parent = newVortex
newRa1.Parent = humrp
newRa2.Parent = humrp
newVortex.Parent = humrp
newYa1.Parent = humrp
newYa2.Parent = humrp
newRa1.Anchored = false
newRa2.Anchored = false
newVortex.Anchored = false
newYa1.Anchored = false
newYa2.Anchored = false
newRa1.CanCollide = false
newRa2.CanCollide = false
newVortex.CanCollide = false
newYa1.CanCollide = false
newYa2.CanCollide = false
newRa1.CFrame = humrp.CFrame
newRa2.CFrame = humrp.CFrame
newVortex.CFrame = humrp.CFrame
newYa1.CFrame = humrp.CFrame
newYa2.CFrame = humrp.CFrame
weld1.Part0 = newRa1
weld1.Part1 = newVortex
weld2.Part0 = newRa2
weld2.Part1 = newVortex
weld3.Part0 = humrp
weld3.Part1 = newVortex
weld4.Part0 = newYa1
weld4.Part1 = newVortex
weld5.Part0 = newYa2
weld5.Part1 = newVortex
while wait()do
newVortex.CFrame = newVortex.CFrame * CFrame.Angles(0,math.rad(90),0)
--controls:Disabled()
--newVortex.CFrame = humrp.CFrame * CFrame.Angles(0,0,0)
local DamageAmount = 15
newVortex.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum and canTouch == false then
print(hit.Parent)
if hit.Parent.Name ~= player.Name then
canTouch = true
print(hit.Parent)
hum.Health = hum.Health - DamageAmount
wait(2)
canTouch = false
end
end
wait(2)
newRa1:Destroy()
newRa2:Destroy()
newVortex:Destroy()
newYa1:Destroy()
newYa2:Destroy()
-- Controller:Enabled()
--bodyVelocity:Destroy()
--bodyPos:Destroy()
humrp.CFrame = humrp.CFrame * CFrame.Angles(0,0,0)
for i, v in pairs(getchar) do
if v:IsA("Part") then
v.Transparency = 0
character:WaitForChild("HumanoidRootPart").Transparency = 1
end
if v:IsA("Accessory") then
v.Handle.Transparency = 0
end
end
end)
end
end)