Super power script not working

hello, so I recently tried to make a super power script but it’s not working
I’ve used this video (tutorial) to help me, here’s the link and the script for the super power

trigger script

local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild(“Humanoid”)
local animation = hum:LoadAnimation(script:WaitForChild(“Animation”))
local mouse = plr.GetMouse()
local debounce = false

mouse.KeyDown:Connect(function(key)
if debounce == true then return end
if key == “q” then
animation:Play()
wait(.3)
script.Slime:FireServer()
wait(10)
debounce = false
end
end)

and the power script
local ts = game:GetService(“TweenService”)

script.Parent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local root = char.HumanoidRootPart
local Slime = game.ReplicatedStorage.Mainice:Clone()
Slime.Parent = char

for i,v in pairs(Slime:GetChildren()) do
	v.Transparency = 1
end

Slime.CFrame = root.CFrame + root.CFrame.lookVector * 15
Slime.Position = Slime.Position + Vector3.new(0,1,0)

for i,v in pairs(Slime:GetChildren()) do
	ts:Create(v,TweenInfo.new(.2,0,0),(Transparency - 0)):Play()
end
ts:Create(Slime,TweenInfo.new(.3,0,0),(root.CFrame - root.CFrame.lookVector * 22 + Vector3.new(0,1.3,0),Transparency - 0)):Play()
game.Debris:AddItem(Slime,6)
wait(5)
for i,v in pairs(Slime:GetChildren()) do
	ts:Create(Slime, TweenInfo.new(.4,0,0),(Transparency - 1)):Play()
end

end)
i need all the information as i can, thanks!
Also, here is my layout of my scripts (if that’s the problem)
explorer1

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local anim = script:WaitForChild("Animation")
local animation = hum:LoadAnimation(anim)
local mouse = plr.GetMouse()
local debounce = false
local slime = script:WaitForChild("Slime")

mouse.KeyDown:Connect(function(key)
	if debounce then
		return
	end
	if key == "q" then
		animation:Play()
		task.wait(.3)
		slime:FireServer()
		task.wait(10)
		debounce = false
	end
end)
1 Like
local ts = game:GetService("TweenService")
local rs = game:GetService("ReplicatedStorage")
local slime = rs:WaitForChild("Slime")

slime.OnServerEvent:Connect(function(plr)
	local char = plr.Character
	local root = char.HumanoidRootPart
	local mainice = rs.Mainice:Clone()
	mainice.Parent = char

	for i, v in pairs(mainice:GetChildren()) do
		v.Transparency = 1
	end

	mainice.CFrame += root.CFrame.lookVector * 15
	mainice.Position += Vector3.new(0,1,0)

	for i,v in pairs(mainice:GetChildren()) do
		ts:Create(v,TweenInfo.new(.2),{Transparency = 0}):Play()
	end

	ts:Create(mainice,TweenInfo.new(.3),{(root.CFrame - root.CFrame.lookVector * 22 + Vector3.new(0,1.3,0)), Transparency = 0}):Play()
	game.Debris:AddItem(mainice,6)
	task.wait(5)

	for i,v in pairs(mainice:GetChildren()) do
		ts:Create(mainice,TweenInfo.new(.4),{Transparency = 1}):Play()
	end
end)

Move the RemoteEvent to the ReplicatedStorage folder instead of placing them inside scripts/placing scripts inside them, move the server script to ServerScriptService and the local script to StarterPlayerScripts or StarterCharacterScripts it’s cleaner that way. The main issue was with the tween’s property tables, they need to be tables, so wrapped inside the typical table constructors “{” and “}” also you had mistakenly used - signs instead of = signs in those same property tables.

2 Likes

Haven’t read through the script at all, not much time.

However, I don’t believe Server Scripts work within Local Scripts.

Move both that and the remote Event outside of the local script and try that.

Otherwise, go through your remote Events and add prints to them. See what is firing and what is not too narrow down the problem.

Yeah, I’ve already mentioned he should do all that, and his issues were mainly with the property tables of the tween service :Create() calls, there were a few other minor things as well but that was the main issue.

1 Like

Thanks, ill try all the tips and scripts you gave me.

it didn’t work, i tried to do as you said but it still didn’t work