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: 2 questions

Previous Thread :: Next Thread 
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:12 AM
1)ch.Torso.CFrame = CFrame.new(m.Hit-ch.Torso.Position) - Why dont this work and how do i fix it?

2)http://wiki.roblox.com/index.php/SetSuperSafeChat_%28Method%29

Does it mean, that i can just set all players to supersafe chat or in reverse? Will not this be against ROBLOX rules?
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
01 Nov 2011 11:15 AM
It doesn't state anywhere in the rules you should not do this, and if they didn't want you to, they'd lock the method.

So it's safe, go ahead. But if you set everyone to SuperSafe your game may not get very popular, people like to be able to talk to each other.
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:16 AM
In fact i want to do it in reverse way. Anyway, what about the first one?
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
01 Nov 2011 11:17 AM
ch.Torso.CFrame = CFrame.new(m["Hit-ch"].Torso.Position);

try that
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:21 AM
Did not work. I just cant understand, why this:

ch.Torso.CFrame = m.Hit-ch.Torso.CFrame

line asks for Vector3. Oh, forgot to say - m == mouse.
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
01 Nov 2011 11:25 AM
ch.Torso.CFrame = CFrame.new(m["Hit-ch"].Torso.Position);

So 'ch' and 'm' are defined and Hit-ch is a valid member of 'm' and 'Torso' is a valid member of Hit-ch, please check that for me.
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:28 AM
I told you, that this did not work. Output says that "Hit-ch is not a valid member of Mouse".
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
01 Nov 2011 11:29 AM
can i have the full script? (or at least the parts it is relative to)
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:31 AM
Of course:

function RightClick(m)
if m.Target ~= nil then
if (m.Target.Position-ch.Torso.Position).magnitude <= 5 then
print("Detected")
if ((m.Target.Position.Y+(m.Target.Size.Y/2))<(ch.Head.Position.Y-0.5) and (m.Target.Position.Y+m.Target.Size.Y)>(ch.Torso.Position.Y-1) and (isc==false)) then
print("passes")
ch.Torso.CFrame = m.Hit-ch.Torso.CFrame
--if isc == false then
--crouch()
--end
end
end
end
end

function GetRightClick(Mouse)
if (F==nil or tempf==1) then F = Instance.new("TextButton",pl.PlayerGui.ScreenGui) tempf=0 end
F.Size = UDim2.new(1,0,1,0)
F.Active = false
F.Text = ""
F.BackgroundTransparency = 1
F.MouseButton2Down:connect(function ()
RightClick(Mouse)
end)
F.MouseButton1Down:connect(function ()LC(Mouse) end)
end

function TE(m)
GetRightClick(m)
m.Button1Down:connect(function() LC(m) end)
m.KeyDown:connect(function(key)
KP(m, key)
end)
end


But i dont know, if how this is connected to problem :(
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:35 AM
Changed script line to:


ch.Torso.CFrame = ch.Torso.CFrame + Vector3.new(m.Hit-ch.Torso.Position)

Now output dont give errors, but does not change Torso CFrame. Any ideas?
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
01 Nov 2011 11:38 AM
Try

ch.Torso.CFrame = ch.Torso.CFrame * CFrame.new(m.Hit-ch.Torso.Position);

If that doesn't work try

ch.Torso.CFrame = ch.Torso.CFrame * Vector3.new(m.Hit-ch.Torso.Position);

If no,

ch.Torso.CFrame = ch.Torso.CFrame * CFrame.new(Vector3.new(m.Hit-ch.Torso.Position));
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 11:41 AM
First 2 give an error, third dont give error, but again, dont move the character.
Report Abuse
kingmod123 is not online. kingmod123
Joined: 16 May 2009
Total Posts: 699
01 Nov 2011 12:49 PM
((m.Target.Position.Y+(m.Target.Size.Y/2)) -- Only giving out 1 error. You're not closing the first bracket /:
Report Abuse
GuessWhoGhostIsIt is not online. GuessWhoGhostIsIt
Joined: 17 Sep 2011
Total Posts: 554
01 Nov 2011 01:28 PM
I closed that bracket on next line.


Again:

I need to change CFrame.
Mouse.Hit is CFrame value
I am adding CFrame

Why do it ever asks for Vector3 value?
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
02 Nov 2011 03:04 AM
Try Mouse.Target
Report Abuse
deividaxas is not online. deividaxas
Joined: 20 Feb 2009
Total Posts: 1054
02 Nov 2011 05:56 AM
mouse.Hit.p --add .p to .Hit

in your case m.Hit.p
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