I'm having trouble getting a normal object orientation on the client, so how to do it:
local script1
function eat() --body of the function end
local script2
function sit() --body of the function end
local script3
function doingSomemthing(desition) if desition then script1.eat() else script2.sit() end end
NOTE: this is in the same player
Any help will be appreciated
Use BindableEvents. They're really easy to use.
Script 1
BindableEvent.Event:Connect(function(arg) print(arg) --> Prints Hello. end)
Script 2
BindableEvent:Fire("Hello")
You can also return things easily.
Script 1
BindableEvent.Event:Connect(function(Num1,Num2) return (Num1 + Num2) end)
Script 2
print(BindableEvent:Fire(5,10)) --> 15