This is an extract of my bigger script but this part of it should 1, Get the clickers name and print it, 2, check if the clickers name is any of the written strings. 3, Get all parts of a model and put them into a table and 4, rotate the model with the mod and angle. I put print("Done")
to see which lines worked and didn't it only got up to, however it only got up to 4 "dones" which means line 5 of this script must be an error? Also this is a normal server script.
This is the broken line according to the print algorithm.
local function rotateMod(mod,center,rotation)
This is the extracted code:
local cn = click.Name print("Done") --1 print(click.Name) print("Done") --1 if click.Name == "doctorbenny2011" or click.Name == "CaptainTheTimeLord" or click.Name == "Player" or click.Name == "Player1" or click.Name == "mim033" then print("Done") -- 2 local game1 = script.Parent.Controls.Matlever.lever print("Done") --3 local function rotateMod(mod,center,rotation) print("Done") local parts = {} print("Done") function scan(parent) print("Done") for _,obj in pairs(parent:GetChildren()) do print("Done") if (obj:IsA("BasePart")) then print("Done") table.insert(parts,obj) end scan(obj) end end scan(mod) for _,part in pairs(parts) do part.CFrame = (center*rotation*(center:inverse()*part.CFrame)) end end local mod = game1 --4 local step = 1 if script.Parent.Variables.Power.Value == true and script.Parent.Variables.Override.Value == false then if status.Value == 1 then status.Value = 2 matlever:Play() for i = 0,9,step do rotateMod(mod,mod:GetModelCFrame(),CFrame.Angles(0,0.2,0)) wait() end
You are missing end
s! Don't expect an answer on this site unless you format your code properly...
local cn = click.Name print("Done") --1 print(click.Name) print("Done") --1 if click.Name == "doctorbenny2011" or click.Name == "CaptainTheTimeLord" or click.Name == "Player" or click.Name == "Player1" or click.Name == "mim033" then print("Done") -- 2 local game1 = script.Parent.Controls.Matlever.lever print("Done") --3 local function rotateMod(mod,center,rotation) print("Done") local parts = {} print("Done") function scan(parent) print("Done") for _,obj in pairs(parent:GetChildren()) do print("Done") if (obj:IsA("BasePart")) then print("Done") table.insert(parts,obj) end scan(obj) end end scan(mod) for _,part in pairs(parts) do part.CFrame = (center*rotation*(center:inverse()*part.CFrame)) end end local mod = game1 --4 local step = 1 if script.Parent.Variables.Power.Value == true and script.Parent.Variables.Override.Value == false then if status.Value == 1 then status.Value = 2 matlever:Play() for i = 0,9,step do rotateMod(mod,mod:GetModelCFrame(),CFrame.Angles(0,0.2,0)) wait() --you are missing several 'end's here. Do you see why proper code formatting is so important? end