Tweenservice not working when fired on client via remoteevent

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I just want the tweenservice to work
  2. 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
  3. 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.


it prints the nearest player, and the humanoid position, now whenever I place the tween and play it
~~lua

    local newmeteor = meteor:Clone()
newmeteor.Parent = workspace
print(nearestcharacter, nearestcharacter.HumanoidRootPart.Position)

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() 

simply doesnt work

why are you storing the tween being played? Why not just store the tween then new line and play it there?

it was originally something like meteorfall:Play(), but that didnt work, as to your question,it felt more efficient since i just needed to play it and nothing else.

ive just made it standalone, still doesnt work

Have you bothered ensuring if things like the object to move exists, player and/or player character exists etc? Also please space out your code, the formatting is bad.

Yep, added print statements, and position that is printed changes everytime the other player is moved, it detects the right properties of the other player, name, positioning etc, and the thing being clone is cloned and spawns but it just falls into the ground with no tweening occuring. The meteor is supposed to spawn 50 studs away from the mouse and the tween moves the meteor spawned in the air to the closest player, and then the ground is supposed to destroy. the ground destroys, the meteor spawns, the player is printed out properly and in real time but the tween simply doesnt work.

Have you tried pcall/xpcall in any extent? Tried checking the callback of the tween at least?

not sure what does do, mind giving a short explanation please

Use the docs (you can find it by scrolling up.).

ah alright, ill give that a shot, thanks!

would this perhaps be the right format?
image

, the code is copy and pasted into the pcall function and plugged it into a variable

Oh, it seems making it anchored worked : D