Problem with my tool
#3
I got an error when I tried to use it, you're missing a "Parent" in both long lines.

Also, variables are case sensitive (so you need a lowercase or capital C everywhere, not both) and you have to put strings (letters, sentences, or words) in quotes or Lua will think you're trying to use a variable.

[lua]
Tool = script.Parent

function Change©
if c == "p" then
if Tool.Parent.Parent.Character.Body.Layer ~= 0 then
Tool.Parent.Parent.Character.Body.Layer = Tool.Parent.Parent.Character.Body.Layer-1
end
elseif c == "l" then
if Tool.Parent.Parent.Character.Body.Layer ~= 2 then
Tool.Parent.Parent.Character.Body.Layer = Tool.Parent.Parent.Character.Body.Layer+1
end
end
end


link(Tool.KeyDown, Change)
[/lua]
Reply


Messages In This Thread
Problem with my tool - by Duck - 05-21-2011, 09:42 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)