|
| 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 |
|
|
|
| 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 |
|
|
|
| 01 Nov 2011 11:16 AM |
| In fact i want to do it in reverse way. Anyway, what about the first one? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 11:17 AM |
ch.Torso.CFrame = CFrame.new(m["Hit-ch"].Torso.Position);
try that |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 01 Nov 2011 11:29 AM |
| can i have the full script? (or at least the parts it is relative to) |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 01 Nov 2011 11:41 AM |
| First 2 give an error, third dont give error, but again, dont move the character. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 02 Nov 2011 05:56 AM |
mouse.Hit.p --add .p to .Hit
in your case m.Hit.p |
|
|
| Report Abuse |
|
|