generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why is enyahs7 so poor

Previous Thread :: Next Thread 
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 01:26 AM
I made a script where you click and you move to spot but it only works with studio why is that and what can I do to change?

function move()
char.Humanoid:MoveTo(Mouse.Hit.p, Workspace.Baseplate)
script.Parent.Busy.Value = false
wait()
end

Mouse.Button1Down:connect(move)
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
28 Aug 2013 01:40 AM
"only works with studio"?
Any output?
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
28 Aug 2013 01:47 AM
It looks as if you are using GetMouse() to get the mouse by the look of things.

Did you define the Mouse and all the variables?

If you are using GetMouse(), make sure you are using a LocalScript.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 09:44 AM
Yeah its in a local script and everything.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 09:46 AM
local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 10:18 AM
That's what I got in localscript
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:56 AM
bum
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Aug 2013 12:02 PM
p
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
28 Aug 2013 12:04 PM
Why do you even need a script to move the player to where they click?
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Aug 2013 12:06 PM
@HumanXerxes, Because that's what ROBLOX used to have and it was Epic Sauce.
(Used a lot in Obbys for Invisible path finding)
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 12:06 PM
@Human
It's called "innovative"

@Enyahs
Is it in starterpack/startergui?
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
28 Aug 2013 12:07 PM
Omg Ive been using MouseLockSwitch so long I didn't even notice the green circle doesn't appear anymore?! Now I understand :P
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 12:10 PM
Yeah I don't know why they haven't just removed classic mode altogether.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 12:10 PM
Its in StarterGui it gets the mouse and works fine in studio and I just want the target to move where I clicked it doesn't need to show the green circle but it did in studio and im a little confused why it doesn't work in regular games.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 12:13 PM
Try targeting the parent player instead of LocalPlayer, maybe? I don't really know but might as well try it
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 12:21 PM
You cannot use a regular script to grab a players mouse it must be local script.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 12:22 PM
It would still be in the localscript, just instead of LocalPlayer.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Aug 2013 12:41 PM
I attempted to make my own version of this:

local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local char = player.Character

local Part = Instance.new("Part", char)
Part.FormFactor = "Custom"
Part.Size = Vector3.new(2, 0.2, 2)
Part.Anchored = true
Part.CanCollide = false
Part.Locked = true
Part.BrickColor = BrickColor.new("Lime green")
local Mesh = Instance.new("CylinderMesh", Part)

Mouse.Button1Down:connect(function ()
if (Mouse.Hit.p - char.Torso.Position).magnitude <= 50 then
char.Humanoid:MoveTo(Mouse.Hit.p) -- Line 16
wait()
end
end)

while true do
wait()
if (Mouse.Hit.p - char.Torso.Position).magnitude <= 50 then
Part.Transparency = 0
Part.CFrame = CFrame.new(Mouse.Hit.p)
else
Part.Transparency = 0
end
end

It did not work, I got an error from Output saying:

game.Players.Player1.PlayerGui.LocalScript.Line 16; Argument 2 missing.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Aug 2013 12:42 PM
That should be:

else
Part.Transparency = 1
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Aug 2013 12:45 PM
Nvm. :/
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
28 Aug 2013 12:45 PM
char.Humanoid:MoveTo(Mouse.Hit.p, --[[the disk thing]]) -- Line 16
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 12:51 PM
Im not trying to recreate the green circle I just want the localplayer who clicked to go into the position I clicked.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Aug 2013 12:54 PM
@janthran,
Yeah, I got that, I'm just completely zoned out today...
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 01:10 PM
Again do we need to use a ball or part to do this? I don't think so lol
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 01:50 PM
bum2
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image