Hello,
Is there possibility of making the local parts in serverscript? How to find player camera from a serverscript? Because I wanna make the all functions in one script so can I make that without creating localscript?
Thanks in advance
Hello,
Is there possibility of making the local parts in serverscript? How to find player camera from a serverscript? Because I wanna make the all functions in one script so can I make that without creating localscript?
Thanks in advance
Nope, you can not get that kind of info through a script, because those values are client-side only. Anyway, what you could do is a localscript that send the server the value you want to communicate. For example:
LOCAL SCRIPT
local RemoteEvent = Place some remote event here
while true do
wait(1) -- This would send the info to the server once per second
RemoteEvent:FireServer(game.Workspace.CurrentCamera.CFrame)
end
SCRIPT
local RemoteEvent = Place that remote event here
RemoteEvent.OnServerEvent:Connect (function (plr, CameraCFrame)
-- Do whatever you want with that CameraCFrame property here.
-- You can also use the plr argument.
end
And about the part, you may send info about the part's CFrame, BrickColor, CanCollide, Shape, Descendants, etc., because there's no way to send all in one value (except a table/array)
Hope this helped!
Good luck with your games
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
The Camera is client side only. Sorry, you need a LocalScript.