so im trying to make a door have an opening animation and a close animation.
when i test the script the door just doesn’t move.
im just learning tweens but i think this should work.
broken script:
local Service = game:GetService("TweenService")
local Prox = script.Parent.ProximityPrompt
local Part = script.Parent
local Tweeninfo = TweenInfo.new(
2,
Enum.EasingStyle.Back,
Enum.EasingDirection.In,
0,
false,
0
)
local Tween = Service:Create(Part,Tweeninfo,{CFrame = CFrame.new(-23.036, 5, -64.364) } )
local OtherTween = Service:Create(Part,Tweeninfo,{CFrame = CFrame.new(-19.5, 5, -58) } )
Prox.Triggered:Connect(function()
Prox.Enabled = false
Tween:Play()
wait(5)
OtherTween:Play()
Prox.Enabled = true
end)
--Code Before This Code
print("Right Here!")--it stops here
Tween:play()
wait(5)
--Code After This Code
so i added some prints it prints right here but it never prints finished at the end it also doesn’t play the tween.
do you have any idea why it stops there?
Oh…So All This Time Anchored should’ve been true???
because if i normally want to change somethings position (like humanoidrootpart or any part needed to teleport)i need to anchor fals (same with MoveTo) so why u need anchored ON this time?
hello good morning can you help me with a script how can I program that when the player makes 10 kills he can be given the emblem of 10 kills and I am using this script for the kills.
I am new at this
kills:
local Players = game.Players
local Template = Instance.new 'BoolValue'
Template.Name = 'leaderstats'
Instance.new('IntValue', Template).Name = "Kills"
Instance.new('IntValue', Template).Name = "Deaths"
Players.PlayerAdded:connect(function(Player)
wait(1)
local Stats = Template:Clone()
Stats.Parent = Player
local Deaths = Stats.Deaths
Player.CharacterAdded:connect(function(Character)
Deaths.Value = Deaths.Value + 1
local Humanoid = Character:FindFirstChild "Humanoid"
if Humanoid then
Humanoid.Died:connect(function()
for i, Child in pairs(Humanoid:GetChildren()) do
if Child:IsA('ObjectValue') and Child.Value and Child.Value:IsA('Player') then
local Killer = Child.Value
if Killer:FindFirstChild 'leaderstats' and Killer.leaderstats:FindFirstChild "Kills" then
local Kills = Killer.leaderstats.Kills
Kills.Value = Kills.Value + 1
end
return
end
end
end)
end
end)
end)
since this topic is solved and nobody will return here, i recommend you make this a topic so more people
can answer your question.
and the first instance.new doesnt have ‘()’.
and why not make a folder call it leaderstats and when a player gets added add it to every player?
(add all the values in the folder ofc)
just for better storage"not really a solution but right now i don’t have time to test this script and fix it.
thats why i recommend making a topic of of this.