Reyscent
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 184 |
|
|
| 26 Dec 2015 06:15 AM |
I just can't even script in the mornings, lol. Here's my code; I know that its wrong just cant figure out what..
--Reyscent
player = script.Parent.Parent.Parent.Parent.Parent
function Give() local Sword = script.Parent.LinkedSword Sword:Clone() Sword.Parent = player.Backpack end
function Remove() local All = script.Parent.Parent.Parent All:Destroy() end
function Teleport() player.Torso.CFrame = CFrame.new(39.536, 0.57, -70.964) end
script.Parent.MouseButton1Down:connect(Teleport) script.Parent.MouseButton1Down:connect(Remove) script.Parent.MouseButton1Down:connect(Give)
:nbc me, omg |
|
|
| Report Abuse |
|
|
Reyscent
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 184 |
|
| |
|
Reyscent
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 184 |
|
| |
|
Reyscent
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 184 |
|
| |
|
|
| 26 Dec 2015 07:05 AM |
Which part of it exactly is not working?What's the output?
Also if you teleport the torso like that the player will die since you're only teleporting the torso and the rest of the body is left back,killing the player. |
|
|
| Report Abuse |
|
|
Reyscent
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 184 |
|
|
| 26 Dec 2015 07:07 AM |
My parents are screwed and it doesnt select the player, I don't think. How do I make it so I don't kill him then?
:nbc me, omg |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2015 07:11 AM |
Well the simple fix is make this a localscript,put this in starterplayerscripts and instead of doing player=script.Parent... do player = game.Players.LocalPlayer
For teleporting the player mode the entire model with MoveTo()(http://wiki.roblox.com/index.php?title=API:Class/Model/MoveTo) or use SetPrimaryPartCFrame (http://wiki.roblox.com/index.php?title=API:Class/Model/SetPrimaryPartCFrame) after setting the torso as the primary part. |
|
|
| Report Abuse |
|
|
Reyscent
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 184 |
|
| |
|
|
| 26 Dec 2015 08:47 AM |
i use this, and i just made a game using a script similar to that, heres the line:
Places = {Vector3.new(26, 140.41, -159.5), Vector3.new(-172, 140.5, -159.5)} local Player = script.Parent.Parent.Parent.Parent.Parent function Click() wait(4.1) Player.Character:MoveTo(Places[math.random(1,#Places)]) end
script.Parent.MouseButton1Down:connect(Click)
--//GavAttack12 |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 26 Dec 2015 08:59 AM |
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function() if Player.Character then local Sword = script.Parent.LinkedSword Sword.Parent = player.Backpack player.Character:MoveTo(Vector3.new(39.536, 0.57, -70.964)) script.Parent.Parent.Parent:Destroy() end end) |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2015 09:03 AM |
The thing I don't understand about forums is that even once the answer is given other people tend to post the variations of the same answer.Not pointing any fingers just pointing this one out.
Now let's all forget I said this and just go to the next thread. |
|
|
| Report Abuse |
|
|