Ohhhhhh… then what @redwoodsteve said would probs work
Wouldn’t it like grow exponentially higher cuz i is always increasing?
you could use tweenService to tween the missile smoothly upwards, but it will not be affected by physics until the tween ends so the missile could go through roofs
local ts = game:GetService("tweenService")
local ti = TweenInfo.new(10,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
local goals = {["Position"] = player.Character.HumanoidRootPart.Position += Vector3.new(0,100,0)}
local tween = ts:Create(ClonedMissle,ti,goals)
tween:Play() --play the tween (send missile upwards)
nvm I miss read your code I want it to teleport up and then like be able to control it from the sky not smoothly go up there and then when it hits the ground it makes what ever it hit blow up!
i fixed my error (instad of “humPos.Y + i” it is “humPos.Y + 1”)
hmm that would be difficult
you could use userInputService to detect when the player presses w,a,s or d then change the missile’s position accordingly
then anchor the player’s humanoidRootPart so they dont move their character while they are moving the missile
now just set the cameraType of workspace.currentCamera to scriptable and set its position to behind the nuke
edit: you would have a variable like “controllingMissile” as a boolean to detect if the player is currently controlling the missile
Use a Touched event for the missile and check if the object/instance it touched isn’t the missile itself
that’s what I would of done for the camera, but the movement is why I created this devfourm post!
I use a single mesh for the missle so it would be okay
nice, so all you have to detect the player’s input
the easiest way is to use userInputService, but on mobile you would not be able to control the missile
example:
game:GetService("UserInputService").InputBegan:Connect(function(input,gpe)
if not gpe and input.KeyCode == Enum.KeyCode.W then
--update missile position to go forwards
end
end)
okay thanks! I’ll try that, i’ll try to find a mobile way but if you find one please tell me!
this article might help with mobile movement
or you could just create a GUI with buttons for forwards, backwards, left and right
okay thanks! do you know a way to constantly move the mesh forward vector forces won’t work because they don’t work on meshs! thanks in advance
increment short amounts in short periods of time?
while true do
move(0.01,0,0) --pretend function
task.wait(0.01) --task.wait() is recommended over wait()
end
testing that right now thanks! typing to turn over
just dont use while(true) because it will loop indefinitely (you prob know that already)
umm yeah I am using rotation to make it work so it can’t be in one direction it has to be in the direction of the front of the missle
i found this post that will help:
(edited code from the post):
`
ClonedMissle.CFrame = ClonedMissle.CFrame + (ClonedMissle.CFrame.LookVector + Vector3.new(1,0,0))
`
keep in mind that this algorithm uses CFrames and not positions
Thank you for the pretend function. I was trying to pretend but couldnt !
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.