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 just want the tweenservice to work -
What is the issue? Include screenshots / videos if possible!
the meteor does not go to the nearestplayer humanoid position, the nearestplayer if printed prints the nearestplayer everything so far seems to be deduced to be the tween not working -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ive searched up solutions and ive tried using a model and referencing its primary part, Ive also looked at the dev forum for tweenservice, but to no avail
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!
meteorfallRemote.OnServerEvent:Connect(function(plr)
local char = plr.Character
local nearestcharacter = nearestplayer:InvokeClient(plr)
local hrp = char.HumanoidRootPart
local mouseposition = mouseremote:InvokeClient(plr)
local Xmouse = mouseposition.X
local Zmouse = mouseposition.Z
local newmeteor = meteor:Clone()
newmeteor.Parent = workspace
print(nearestcharacter)
local relativepos = hrp.CFrame:PointToObjectSpace(Vector3.new(Xmouse,0,Zmouse)).Unit * 50 + hrp.CFrame.UpVector * 100
local worldpos = hrp.CFrame:PointToWorldSpace(relativepos)
newmeteor.Position = worldpos
local relativepos = hrp.CFrame:PointToObjectSpace(Vector3.new(Xmouse,0,Zmouse)).Unit * 50 + hrp.CFrame.UpVector * 100
local worldpos = hrp.CFrame:PointToWorldSpace(relativepos)
newmeteor.OutMeteor.Position = worldpos
local goal = {}
goal.CFrame = CFrame.new(nearestcharacter.HumanoidRootPart.Position)
local meateorfall = ts:Create(newmeteor, ti, {Position = nearestcharacter.HumanoidRootPart.Position}):Play()
nearestcharacter.HumanoidRootPart.Anchored = false
local touched = false
newmeteor.OutMeteor.Touched:Connect(function(otherpart)
if otherpart.Parent == nearestcharacter then
if touched == true then return end
local Size = Vector3.new(10,10,10)
local Cframe = nearestcharacter.HumanoidRootPart.CFrame * CFrame.new(Vector3.new(0,-3,0))
local Shape = Enum.PartType.Ball
local MinimumSize = 4
local Seconds = 20
local Voxels = destroyscript:CreateHitbox(Size, Cframe, Shape, MinimumSize, Seconds)
for i, v in pairs(Voxels) do
local ac = Instance.new("Attachment", v)
ac.CFrame = CFrame.new(0.1,0,0.2)
local ac2 = Instance.new("Attachment", v)
ac2.CFrame = CFrame.new(-0.1, 0, -0.2)
local t = Instance.new("Trail", ac)
t.Attachment0 = ac
t.Attachment1 = ac2
v.Anchored = false
v.Size = Vector3.new(1,1,1)
v.AssemblyLinearVelocity = Vector3.new(math.random(100,150),100,math.random(100,150))
end
touched = true
end
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.