Hi there, scripters! I ran into a problem when trying to make an interface located inside the player's ScreenGui. I am aware that the recent Roblox update forced FE on, but I can't seem to fix this. Any help is appreciated! Both of these scripts are inside of a textbox, inside of a ScreenGui:
Local script- indexes mouse and runs while loop:
wait(1) mouse = game.Players.LocalPlayer:GetMouse() speed = game.ReplicatedStorage.Speed:Clone() speed.Parent = game.Players.LocalPlayer health = game.ReplicatedStorage.Health:Clone() health.Parent = game.Players.LocalPlayer while wait(0.1) do for i,v in pairs(script.Parent:GetChildren()) do if v.Name == "SpeedButton" then v.Position = UDim2.new(0,speed.Value,0,v.Position.Y.Offset) script.Parent.Script.Adjust:FireServer(v,speed,health,mouse,"WalkSpeed","MaxHealth",0.17,1.05) end if v.Name == "HealthButton" then v.Position = UDim2.new(0,health.Value,0,v.Position.Y.Offset) script.Parent.Script.Adjust:FireServer(v,health,speed,mouse,"MaxHealth","WalkSpeed",1.05,0.17) end if v.Name == "Done" then v.MouseButton1Click:Connect(function() script.Parent.Visible = false script.Parent.Sound1:Play() end) end end end
Script- receives fire server and mouse coordinates
click = 0 script.Adjust.OnServerEvent:Connect(function(player,v,value1,value2,mouse,property1,property2,x1,x2) v.MouseButton1Down:Connect(function() click = 1 repeat wait(0.01) if mouse.X > 5 and mouse.X < 190 then value1.Value = math.floor(mouse.X/15)*15 + 5 value2.Value = 190 - (math.floor(mouse.X/15)*15 + 5) end mouse.Button1Up:Connect(function() click = 0 end) until click == 0 player.Character.Humanoid[property1] = value1.Value * x1 + 10 player.Character.Humanoid[property2] = value2.Value * x2 + 10 player.Character.Humanoid.Health = player.Character.Humanoid.MaxHealth end) end)
I'd also like to mention that this works fine in Studio, but on a server it's broken. It doesn't show any error messages in the output... Thanks!