Why is this not working?

LocalScript
Its for a Fly Script
Error: image

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.Camera
local UserInputService = game:GetService("UserInputService")

local WNumber = 10

UserInputService.InputBegan:Connect(function(InputBegan)
	if InputBegan.KeyCode == Enum.KeyCode.W then
		Camera.CFrame = Camera.CFrame.LookVector * WNumber
	end
end)

Please Can Someone help (IM NOT USING BODYMOVER TO STOP HACKER!)

1 Like

Well first, you can’t add a number to another vector. Additionally you would need a CFrame to set the Camera’s CFrame.

However, moving the camera wont move the player.

2 Likes

Can you read the thread before commenting

How do I make a fly script with using BODY MOVERS!

Maybe change the title to something like “trying to make a fly script using body movers” would be better than “why is this not working” since everybody and their dog seems to be using that very vague title lately.

1 Like

Maybe try read the thread then you would know im trying to make a fly script using the camera: How do I make a fly script using the camera?

My issue is that I see the title “Please fix this” or “Why is this not working” so often and many times I just pass by it without even clicking on it. It’s like just saying “Help” and expecting everyone to click on it.

If you are more specific in the title then someone reading the list of titles may think “Oh, I know this subject and can help this person out”.

I am just trying to assist you in getting a better response to your title. If you don’t want to listen that’s fine, but as I’ve stated a more clear title will get you more help.

Also, why do you need two posts about the same subject?

1 Like

You have to say * instead of +

Can you try and be more specific in your posts and use the format given as it makes it much easier to help!

1 Like

That doesn’t seem to be the problem here. That would’ve given an unary error if it was invalid, but since it isn’t that would only result in the math being wrong, not an error.