Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

LookVector is not a valid member of Vector3?

local replicatedstorage = game:GetService("ReplicatedStorage")
local runservice = game:GetService("RunService")

replicatedstorage.Events.pinkPower2.OnServerEvent:Connect(function(player, mousePos)
	
	local character = player.Character
	
	local pinkpower21 = game.ReplicatedStorage.Effects.PinkPower21:Clone()
	pinkpower21.Parent = workspace.ignored
	
	pinkpower21.Position = character.LeftHand.position
	
	local connection
	connection = runservice.Heartbeat:Connect(function(dt)
		pinkpower21.CFrame = CFrame.new(pinkpower21.Position) + mousePos.LookVector <- where the error is
	end)
end)

1 answer

✓ Accepted answer

Lookvector is only in CFrames For your case you have to turn mousepos into a CFrame or in the remote event send mouse.Hit instead mouse.hit returns a cframe

2 comments

0

how do i turn mousePos into a CFrame??

0

As I said instead of returning Mouse.Hit.Position return the Cframe it self which is Mouse.Hit

This discussion is preserved as it was. New answers, comments, and votes are closed.