Okay so when i open up roblox studio my laptop fans start and it gets very loud and hot very quickly, I could even burn my hand if i hold my hand long enough on it. So I was wondering is it the script in roblox or is it just my shitty laptop.
Also please reply if i commented on the wrong category or could change the title to something more suitable. My laptop specs are, Proccesor: 11th Gen Intel(R) Core™ i5-1135G7 and graphicscard: NVIDIA GeForce MX450
So in my game there 3 folders at the moment that have about 107 doors combined from each folder. Inside each folder there 1 script that weilds my door togheter and yeah, makes them work properly. So there is 3 scripts. Please reply if the code could be improved in some way.
local tweenService = game:GetService("TweenService")
local skop = script.Parent:GetChildren()
local function Tween(object, goal, easingStyle, tweenTime)
local tween = tweenService:Create(object, TweenInfo.new(tweenTime, easingStyle), goal)
return tween
end
for i, model in pairs(skop) do
if model:IsA("Model") then
for i, part in pairs(model:GetChildren()) do
if part ~= model.PrimaryPart and part:IsA("BasePart") then
local weld = Instance.new("WeldConstraint")
weld.Parent = model.PrimaryPart
weld.Part0 = model.PrimaryPart
weld.Part1 = part
part.Anchored = false
end
end
end
end
for i, model in pairs(skop) do
if model:IsA("Model") then
local open = false
local debouce = false
local promt6 = Instance.new("ProximityPrompt")
promt6.Parent = model.Handle6
promt6.ActionText = "Open"
local promt8 = Instance.new("ProximityPrompt")
promt8.Parent = model.Handle7
promt8.ActionText = "Open"
promt6.Triggered:Connect(function(Player)
if debouce == false then
debouce = true
if open then
open = false
promt6.ActionText = "Open"
promt8.ActionText = "Open"
local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(100), 0)}, Enum.EasingStyle.Sine, 1)
tween:Play()
else
open = true
promt6.ActionText = "Close"
promt8.ActionText = "Close"
local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-100), 0)}, Enum.EasingStyle.Sine, 1)
tween:Play()
end
task.wait(1)
debouce = false
end
end)
promt8.Triggered:Connect(function(Player)
if debouce == false then
debouce = true
if open then
open = false
promt6.ActionText = "Open"
promt8.ActionText = "Open"
local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(100), 0)}, Enum.EasingStyle.Sine, 1)
tween:Play()
else
open = true
promt6.ActionText = "Close"
promt8.ActionText = "Close"
local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-100), 0)}, Enum.EasingStyle.Sine, 1)
tween:Play()
end
task.wait(1)
debouce = false
end
end)
end
end