Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

CFrame.LookVector*speed is not working. Why?

Asked by
hallmk7 50
5 years ago
Edited 5 years ago

hi guys! while i was working with a turret, i saw its bullet not go in the direction of my angle of turret. I'm using a Gui for shooting consisting of the local script:-

01**local TurretGui = script.Parent
02 
03local Frame = TurretGui:WaitForChild("Frame")
04local Button = Frame:WaitForChild("FireButton")
05 
06local Seat = workspace:WaitForChild("Turret"):WaitForChild("MainModel"):WaitForChild("Seat")
07 
08local player = game.Players.LocalPlayer
09local Camera = game.Workspace.CurrentCamera
10local IncrementBox = Frame.IncrementBox
11 
12Frame.Visible = false
13 
14Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
15    local humanoid = Seat.Occupant
View all 44 lines...

and then the normal script in server script service:-

01**game.Players.PlayerAdded:Connect(function(player)
02 
03wait(10)
04 
05    local Gui = player.PlayerGui.TurretGui
06    print("GuiFound")
07    local Frame = Gui.Frame
08    local button = Frame.FireButton
09    local Sound = game.Workspace.Turret.MortarSound
10 
11button.MouseButton1Click:Connect(function()
12 
13        local Nozzel = game.Workspace.Turret.MainModel.FireNozzel
14        local firePart = game.ServerStorage.FirePart:Clone()
15        firePart.Parent = game.Workspace
View all 47 lines...

please someone help what do i do...

Answer this question