UserInputService = game:GetService("UserInputService") local Spawn1 = game.Workspace.SpawnLocation UserInputService.InputBegan:Connect(function(input, GameProcessedEvent) if input.KeyCode == Enum.KeyCode.A then Spawn1.Position = Vector3.new(50,50,50) end)
Hello! Well, this error has happened many times and I still do not know why two things:
Thank you, I am still a beginner!
UserInputService.InputBegan:Connect(function(input, GameProcessedEvent)
Above is a function and needs an end with a parenthesis
if input.KeyCode == Enum.KeyCode.A then
Above is a statement and requires an end
UserInputService = game:GetService("UserInputService") local Spawn1 = game.Workspace.SpawnLocation UserInputService.InputBegan:Connect(function(input, GameProcessedEvent) if input.KeyCode == Enum.KeyCode.A then Spawn1.Position = Vector3.new(50,50,50) end end)
You forgot the second end.